기본 콘텐츠로 건너뛰기

static web tools

ANGULARJS & MATERIAL

AngularJS CLI

  1. New project.
ng new projectname



  1. npm install --save @angular/material @angular/cdk
  2. npm install --save @angular/animations
    1. import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

      @NgModule({
       ...
       imports: [BrowserAnimationsModule],
       ...
      })
      export class PizzaPartyAppModule { }
  3. import the NgModule for each component you want to use
    1. import {MatButtonModule, MatCheckboxModule} from '@angular/material';

      @NgModule({
       imports: [MatButtonModule, MatCheckboxModule],
       exports: [MatButtonModule, MatCheckboxModule],
      })
      export class MyOwnCustomMaterialModule { }
  4. Include a theme

    1. style.css
      1. @import "~@angular/material/prebuilt-themes/indigo-pink.css";
  5. Gesture Support

    1. npm install --save hammerjs
    2. After installing, import it on your app's entry point (e.g. src/main.ts).
      1. import 'hammerjs';




SURGE

댓글