Just twitted the slides @jsdude005
npm install -g @angular/cli
ng new bangular-bank
cd bangular-bank
ng serve
ng generate component user
ng g c user
function add(a: number, b: number) {
return a + b;
}
add(1, 3); // returns 4
add(1, '3'); // causes a compiler error
{{happyText}}
ng g s github\github
Makes the blocks of functionality available in the imported modules available to the contents of this module
import {Http} from '@angular/http';
import { GithubService} from '../services/github.service';
import {HttpModule} from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-user-card',
templateUrl: './user-card.component.html',
styleUrls: ['./user-card.component.css']
})
export class UserCardComponent implements OnInit {
@Input() user;
constructor() { }
}
import { Routes } from '@angular/router';
export const appRoutes: Routes = [
{
path:'',
component: UsersComponent
},
{
path:'users',
component: UsersComponent
},
{
path:'**',
component: NotFoundComponent
}
]
//app.modules.ts
import { RouterModule} from '@angular/router';
imports:[
RouterModule.forRoot(appRoutes)
]
Welcome to {{title}}!
ng lint
ng test
ng build
ng build --prod
ng serve --prod
Email: khan4019@gmail.com
@jsdude005
www.thatJSDude.com