ANGULARJS & MATERIAL
SURGE
AngularJS CLI
- New project.
ng new projectname
To use Angular Material
- npm install --save @angular/material @angular/cdk
- npm install --save @angular/animations
- import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
@NgModule({
...
imports: [BrowserAnimationsModule],
...
})
export class PizzaPartyAppModule { } - import the NgModule for each component you want to use
- import {MatButtonModule, MatCheckboxModule} from '@angular/material';
@NgModule({
imports: [MatButtonModule, MatCheckboxModule],
exports: [MatButtonModule, MatCheckboxModule],
})
export class MyOwnCustomMaterialModule { } Include a theme
- style.css
- @import "~@angular/material/prebuilt-themes/indigo-pink.css";
Gesture Support
- npm install --save hammerjs
- After installing, import it on your app's entry point (e.g. src/main.ts).
- import 'hammerjs';
SURGE
댓글
댓글 쓰기