Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 1.3 KB

FIRST-APP.md

File metadata and controls

63 lines (40 loc) · 1.3 KB

First Angular App

  1. create git repository

  2. prepare instructions

     install yarn  
     yarn global add  @angular/cli  
     ng config -g cli.packageManager yarn  
    
  3. create new angular project

     ng new ntt-time --routing --prefix time --style sass
    
  4. push to git

     git remote add origin https://github.com/vaceslav/ntt-time.git  
     git push -u origin master  
     `username and password`
    
  5. create branch for development

Development

yarn start
  1. remove unused content

  2. edit vs code settings

     "[typescript]": {
         "editor.formatOnSave": true
     }
    
  3. create .prettierrc

     {
         "printWidth": 120,
         "singleQuote": true
     }
    
  4. create new component: TimeEntry

     ng g c components/entry
    
  5. create new component: TimeEntryList

     ng g c components/entry-list
    
  6. create @Input()'s

  7. create dummy data

  8. create button: add item

Add Material Design

yarn add @angular/material @angular/cdk

add ButtonModule

    <button (click)="addItemClick()">Add Item</button>

extend style

    @import "~@angular/material/prebuilt-themes/deeppurple-amber.css";  


<button mat-raised-button color="primary" (click)="addItemClick()">Add Item</button>

create some styles for entry