From 661c97e0206b8e11aec076545f0382c03b8778eb Mon Sep 17 00:00:00 2001 From: Elle Beal Date: Thu, 19 May 2016 16:40:03 -0700 Subject: [PATCH] Material remove (#613) * Remove material2 and simplify html and css * add form back to home * add exterior state back to app * add about content back in * update e2e test --- config/webpack.common.js | 1 - config/webpack.test.js | 1 - package.json | 12 ------ src/app/about/about.component.ts | 26 +++++------- src/app/app.component.ts | 36 +++++----------- src/app/app.css | 34 +-------------- src/app/app.e2e.ts | 14 +++---- src/app/home/home.css | 15 +------ src/app/home/home.html | 34 +++++++-------- src/index.html | 1 - .../browser/angular2-material2/index.ts | 42 ------------------- src/platform/browser/directives.ts | 7 +--- src/platform/browser/providers.ts | 5 --- src/vendor.ts | 13 ------ 14 files changed, 45 insertions(+), 196 deletions(-) delete mode 100644 src/platform/browser/angular2-material2/index.ts diff --git a/config/webpack.common.js b/config/webpack.common.js index 634b38bd8f..be0402e750 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -123,7 +123,6 @@ module.exports = { exclude: [ // these packages have problems with their sourcemaps helpers.root('node_modules/rxjs'), - helpers.root('node_modules/@angular2-material'), helpers.root('node_modules/@angular'), ] } diff --git a/config/webpack.test.js b/config/webpack.test.js index fd51979c7d..1a56bb2e39 100644 --- a/config/webpack.test.js +++ b/config/webpack.test.js @@ -88,7 +88,6 @@ module.exports = { exclude: [ // these packages have problems with their sourcemaps helpers.root('node_modules/rxjs'), - helpers.root('node_modules/@angular2-material'), helpers.root('node_modules/@angular') ]} diff --git a/package.json b/package.json index d8b50c22c4..5504df643b 100644 --- a/package.json +++ b/package.json @@ -66,18 +66,6 @@ }, "dependencies": { - "@angular2-material/button": "2.0.0-alpha.4", - "@angular2-material/card": "2.0.0-alpha.4", - "@angular2-material/checkbox": "2.0.0-alpha.4", - "@angular2-material/icon": "2.0.0-alpha.4", - "@angular2-material/core": "2.0.0-alpha.4", - "@angular2-material/input": "2.0.0-alpha.4", - "@angular2-material/list": "2.0.0-alpha.4", - "@angular2-material/progress-bar": "2.0.0-alpha.4", - "@angular2-material/progress-circle": "2.0.0-alpha.4", - "@angular2-material/radio": "2.0.0-alpha.4", - "@angular2-material/sidenav": "2.0.0-alpha.4", - "@angular2-material/toolbar": "2.0.0-alpha.4", "@angular/http": "2.0.0-rc.1", "@angular/common": "2.0.0-rc.1", "@angular/compiler": "2.0.0-rc.1", diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index c31de54356..ab5a334aef 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -11,24 +11,18 @@ console.log('`About` component loaded asynchronously'); @Component({ selector: 'about', styles: [` - h1 { - font-family: Arial, Helvetica, sans-serif - } - md-card{ - margin: 25px; - } `], template: ` - - For hot module reloading run -
npm run start:hmr
-
- -

- patrick@AngularClass.com -

-
- +

About

+
+ For hot module reloading run +
npm run start:hmr
+
+
+

+ patrick@AngularClass.com +

+
` }) export class About { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 6782958a1a..c3b15dcc8f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -19,37 +19,21 @@ import { RouterActive } from './router-active'; directives: [ RouterActive ], encapsulation: ViewEncapsulation.None, styles: [ - require('normalize.css'), require('./app.css') ], template: ` - - - {{ name }} - - - - - - - - + + + -
this.appState.state = {{ appState.state | json }}
- - -
- ` + ` }) @RouteConfig([ { path: '/', name: 'Index', component: Home, useAsDefault: true }, diff --git a/src/app/app.css b/src/app/app.css index 7201173393..c5721b117e 100644 --- a/src/app/app.css +++ b/src/app/app.css @@ -1,34 +1,4 @@ html, body{ height: 100%; - background: #F4FAFA; -} -button.active{ - background: #fff; - color: #009688; -} -button.active:hover{ - color: #fff; -} -.fill{ - flex: 1 1 auto; -} -.app-state{ - margin: 15px; - flex: 1; -} -.home{ - flex: 1; -} -md-content{ - display: flex; - flex-direction: column; - height: 100%; -} -footer{ - flex: 0 0 60px; - padding: 10px; - display: flex; - align-items: center; - justify-content: center; - background: #fff; -} + font-family: Arial, Helvetica, sans-serif +} \ No newline at end of file diff --git a/src/app/app.e2e.ts b/src/app/app.e2e.ts index ecc503e12d..1d41054370 100644 --- a/src/app/app.e2e.ts +++ b/src/app/app.e2e.ts @@ -11,21 +11,21 @@ describe('App', () => { expect(subject).toEqual(result); }); - it('should have
', () => { - let subject = element(by.css('app header')).isPresent(); + it('should have header', () => { + let subject = element(by.css('h1')).isPresent(); let result = true; expect(subject).toEqual(result); }); - it('should have
', () => { - let subject = element(by.css('app main')).isPresent(); + it('should have ', () => { + let subject = element(by.css('app home')).isPresent(); let result = true; expect(subject).toEqual(result); }); - it('should have