From 78132f5aad80397ff024dc9e7aa6ea4915c57332 Mon Sep 17 00:00:00 2001 From: christikaes Date: Sun, 30 Oct 2016 14:46:41 -0400 Subject: [PATCH 1/4] Upgrade dependencies, default to JIT compilation --- package.json | 20 ++++++++++---------- src/main.ts | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 968c179..6dba1d8 100644 --- a/package.json +++ b/package.json @@ -12,23 +12,23 @@ }, "private": true, "dependencies": { - "@angular/common": "^2.0.0", - "@angular/compiler": "^2.0.0", - "@angular/core": "^2.0.0", + "@angular/common": "^2.1.2", + "@angular/compiler": "^2.1.2", + "@angular/core": "^2.1.2", "@angular/forms": "^2.0.0", "@angular/http": "^2.0.0", - "@angular/platform-browser": "^2.0.0", - "@angular/platform-browser-dynamic": "^2.0.0", "@angular/material": "2.0.0-alpha.9-3", + "@angular/platform-browser": "^2.1.2", + "@angular/platform-browser-dynamic": "^2.0.0", "@angular/router": "^3.0.0", "core-js": "^2.4.0", - "rxjs": "5.0.0-beta.12", + "rxjs": "^5.0.0-beta.12", "ts-helpers": "^1.1.1", - "zone.js": "^0.6.21" + "zone.js": "^0.6.26" }, "devDependencies": { - "@angular/compiler-cli": "^0.6.3", - "@angular/platform-server": "^2.0.0", + "@angular/compiler-cli": "^2.1.2", + "@angular/platform-server": "^2.1.2", "@types/hammerjs": "^2.0.32", "@types/jasmine": "^2.2.30", "angular-cli": "^1.0.0-beta.16", @@ -43,6 +43,6 @@ "protractor": "4.0.3", "ts-node": "1.2.1", "tslint": "3.13.0", - "typescript": "^2.0.2" + "typescript": "^2.0.6" } } diff --git a/src/main.ts b/src/main.ts index 080d27a..e2aaafa 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,9 +11,9 @@ if (environment.production) { * JIT compile. */ -// import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -// import {MaterialAppModule} from './app/app.module'; -// platformBrowserDynamic().bootstrapModule(MaterialAppModule); +import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; +import {MaterialAppModule} from './app/app.module'; +platformBrowserDynamic().bootstrapModule(MaterialAppModule); /** @@ -21,6 +21,6 @@ if (environment.production) { * First run `./node_modules/.bin/ngc -p ./src/` */ -import {platformBrowser} from '@angular/platform-browser'; -import {MaterialAppModuleNgFactory} from './aot/app/app.module.ngfactory'; -platformBrowser().bootstrapModuleFactory(MaterialAppModuleNgFactory); +// import {platformBrowser} from '@angular/platform-browser'; +// import {MaterialAppModuleNgFactory} from './aot/app/app.module.ngfactory'; +// platformBrowser().bootstrapModuleFactory(MaterialAppModuleNgFactory); From 37bb884f97af416cc82efb9f0d59dcdb539e9165 Mon Sep 17 00:00:00 2001 From: Christi Kaes Date: Sun, 30 Oct 2016 14:56:43 -0400 Subject: [PATCH 2/4] Add more instructions to README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 1758445..381a404 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,32 @@ Simple app that consumes Angular Material 2 components. Built with the `angular-cli`. See it live: https://material2-app.firebaseapp.com/ + +## Getting started + +Clone this repo + +``` bash +git clone https://github.com/jelbourn/material2-app.git my-app +cd my-app +``` + +Install dependencies + +```bash +npm install +``` + +Start the server! + +``` +npm start +``` + +This will run `ng serve` and the project is accessible at: `http://localhost:4200/` + +You're all set (: + +## AOT/JIT Compilation + +By default JIT compilation is enabled. To disable AoT compilation update `/src/main.ts` From de77388586cf5be5fa08d74a4efa6b95106a6336 Mon Sep 17 00:00:00 2001 From: christikaes Date: Sun, 30 Oct 2016 15:25:16 -0400 Subject: [PATCH 3/4] change 'toggle dark theme' to a toggle --- package.json | 3 ++- src/app/app.component.html | 2 +- src/app/app.module.ts | 2 ++ src/polyfills.ts | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6dba1d8..2c5c829 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,14 @@ "@angular/common": "^2.1.2", "@angular/compiler": "^2.1.2", "@angular/core": "^2.1.2", - "@angular/forms": "^2.0.0", + "@angular/forms": "^2.1.2", "@angular/http": "^2.0.0", "@angular/material": "2.0.0-alpha.9-3", "@angular/platform-browser": "^2.1.2", "@angular/platform-browser-dynamic": "^2.0.0", "@angular/router": "^3.0.0", "core-js": "^2.4.0", + "hammerjs": "^2.0.8", "rxjs": "^5.0.0-beta.12", "ts-helpers": "^1.1.1", "zone.js": "^0.6.26" diff --git a/src/app/app.component.html b/src/app/app.component.html index 0424b95..02279ee 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -12,7 +12,7 @@ Angular Material2 Example App - + TOGGLE DARK THEME
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 435d3ef..4b24884 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,11 +1,13 @@ import {NgModule} from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; +import {FormsModule} from '@angular/forms'; import {MaterialModule} from '@angular/material'; import {Material2AppAppComponent} from './app.component'; @NgModule({ imports: [ BrowserModule, + FormsModule, MaterialModule.forRoot(), ], declarations: [Material2AppAppComponent], diff --git a/src/polyfills.ts b/src/polyfills.ts index 3b4c55b..4593cda 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -17,3 +17,5 @@ import 'core-js/es6/reflect'; import 'core-js/es7/reflect'; import 'zone.js/dist/zone'; + +import 'hammerjs'; From 954be8107673fafd8f8a572976585354d1a66ffe Mon Sep 17 00:00:00 2001 From: christikaes Date: Sun, 30 Oct 2016 15:27:49 -0400 Subject: [PATCH 4/4] Add slide toggle examples --- src/app/app.component.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/app.component.html b/src/app/app.component.html index 02279ee..a8ea03d 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -31,6 +31,11 @@ Disabled + + Default Slide Toggle + Disabled Slide Toggle + + Alpha Beta