Skip to content

Instantly share code, notes, and snippets.

@rafszul
Last active July 28, 2020 10:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafszul/cb81ff8e693a86a8d4c6fc2b38ba8fd4 to your computer and use it in GitHub Desktop.
Save rafszul/cb81ff8e693a86a8d4c6fc2b38ba8fd4 to your computer and use it in GitHub Desktop.
ng new heyBarista-cupping --ng4 --routing --style=scss --prefix cupping

ng new heyBarista-cupping --ng4 --routing --style=scss --prefix cupping

https://github.com/angular/angular-cli/wiki/stories-include-angular-material

npm install --save @angular/material npm install --save @angular/animations

in app.module.ts:

import { MaterialModule } from '@angular/material';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import 'hammerjs';
import { FlexLayoutModule } from '@angular/flex-layout';
import { AngularFireModule } from 'angularfire2';

// other imports

@NgModule({
  imports: [
    ...
    MaterialModule,
    BrowserAnimationsModule,
    FlexLayoutModule,
    AngularFireModule
  ],
  ...
})

npm install --save hammerjs

in app.module.ts: import 'hammerjs';

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

https://github.com/angular/angular-cli/wiki/stories-include-angular-flex

npm install --save @angular/flex-layout

Add the following to src/app/app.component.css...

.header {
  background-color: lightyellow;
}

.left {
  background-color: lightblue;
}

.right {
  background-color: pink;
}

To verify flex-layout has been set up correctly, change src/app/app.component.html to the following...

<div fxLayout="column">

  <div class="header" fxLayout="row" fxLayoutAlign="space-between center">
    
    <h1>
      {{title}}
    </h1>

  </div>

  <div fxLayout="row">

    <div class="left" fxFlex="20">
      LEFT: 20% wide
    </div>

    <div class="right" fxFlex>
      RIGHT: 80% wide
    </div>

  </div>
</div>

https://github.com/angular/angular-cli/wiki/stories-include-angularfire

npm install --save angularfire2 firebase

in case of error:

ERROR in ./~/firebase/app/shared_promise.js Module not found: Error: Can't resolve 'promise-polyfill' in

run:

npm install promise-polyfill --save-exact

http://stackoverflow.com/questions/43428415/error-in-firebase-app-shared-promise-js


npm install @angular-mdl/core --save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment