-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Angualr 2 material design components example
- Loading branch information
1 parent
06fc3c2
commit 76f6cd7
Showing
8 changed files
with
75 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import {Component} from '@angular/core'; | ||
// import {MdToolbar} from '@angular2-material/toolbar'; | ||
// import {MdButton} from '@angular2-material/button'; | ||
import {MdToolbar} from '@angular2-material/toolbar'; | ||
import {MdButton} from '@angular2-material/button'; | ||
|
||
@Component({ | ||
selector: 'material-app', | ||
templateUrl: '/app/app.component.html' | ||
//,directives: [MdToolbar, MdButton] | ||
templateUrl: '/app/app.component.html', | ||
directives: [MdToolbar, MdButton] | ||
}) | ||
export class AppComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {bootstrap} from '@angular/platform-browser-dynamic'; | ||
import {AppComponent} from './app.component'; | ||
|
||
bootstrap(AppComponent); | ||
bootstrap(AppComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,4 @@ | |
"typescript": "^1.8.10", | ||
"typings": "^0.8.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* Override at the last minute with global.filterSystemConfig (as plunkers do) | ||
*/ | ||
(function(global) { | ||
|
||
// map tells the System loader where to look for things | ||
var _map = { | ||
'app': 'app', // 'dist', | ||
'rxjs': 'node_modules/rxjs', | ||
'@angular': 'node_modules/@angular', | ||
'@angular2-material': 'node_modules/@angular2-material' | ||
}; | ||
|
||
// packages tells the System loader how to load when no filename and/or no extension | ||
var _packages = { | ||
'app': { main: 'main.js', defaultExtension: 'js' }, | ||
'rxjs': { defaultExtension: 'js' } | ||
}; | ||
|
||
var _angularPackages = [ | ||
'@angular/common', | ||
'@angular/compiler', | ||
'@angular/core', | ||
'@angular/platform-browser', | ||
'@angular/platform-browser-dynamic' | ||
]; | ||
|
||
var _materialPackages = [ | ||
'core', | ||
'button', | ||
'card', | ||
'checkbox', | ||
'icon', | ||
'input', | ||
'list', | ||
'progress-bar', | ||
'progress-circle', | ||
'radio', | ||
'sidenav', | ||
'toolbar' | ||
]; | ||
|
||
// add package entries for angular packages in the form | ||
// '@angular/common': { main: 'index.js', defaultExtension: 'js' } | ||
_angularPackages.forEach(function(pkgName) { | ||
_packages[pkgName] = { main: 'index.js', defaultExtension: 'js' }; | ||
// _packages[pkgName] = { main: 'index' }; | ||
}); | ||
|
||
_materialPackages.forEach(function(pkgName) { | ||
// All Material 2 components are prefixed with @angular2-material and use the components name as entry point. | ||
_packages['@angular2-material/' + pkgName] = { main: pkgName }; | ||
}); | ||
|
||
console.log(_packages); | ||
|
||
var config = { | ||
map: _map, | ||
packages: _packages | ||
}; | ||
|
||
System.config(config); | ||
|
||
})(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
"typings/main", | ||
"typings/main.d.ts" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438", | ||
"node": "registry:dt/node#4.0.0+20160509154515" | ||
} | ||
} | ||
} |