Skip to content

Instantly share code, notes, and snippets.

@Tanapruk
Last active February 14, 2017 04:41
Show Gist options
  • Select an option

  • Save Tanapruk/88122d798536c4ad6576177555a436a0 to your computer and use it in GitHub Desktop.

Select an option

Save Tanapruk/88122d798536c4ad6576177555a436a0 to your computer and use it in GitHub Desktop.
Angular2 As Quick As possible

Installation

  • Brew

  • Install a Package Manager for Binary

  • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  • Node

  • Install NodeJS binary. So that we can easily install node's library.

  • brew install node

  • Angular-cli

  • Install angular command line helper.

  • npm -g install angular-cli

  • Init project

  • Use this to init angular project, so that you don't have to manually create package.json app.component.xxx

  • ng new my-project

  • Install Material Theme (Optional)

  • cd my-project

  • npm install --save @angular/material (This will append this library to dependencies json inside package.json)

Setup

  • go to app.module.ts
    • Add MaterialModule.forRoot() inside imports.
  • go to style.css
    • Add @import '~@angular/material/core/theming/prebuilt/deeppurple-amber.css';

Usage

  • Add Html element that start with md e.g., <md-checkbox> for a Material Design Checkbox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment