摘要: import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router"; import { Product } from "../product/product.component"; import { Observable } from "rxjs/Observable"; i... 阅读全文
posted @ 2018-04-21 22:58 chester·chen 阅读(448) 评论(0) 推荐(0)
摘要: import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './home/home.component'; import { ProductComponent } from './... 阅读全文
posted @ 2018-04-21 22:03 chester·chen 阅读(139) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-04-21 21:49 chester·chen 阅读(124) 评论(0) 推荐(0)
摘要: const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'product/:id', component: Prod... 阅读全文
posted @ 2018-04-21 20:58 chester·chen 阅读(130) 评论(0) 推荐(0)
摘要: const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'product/:id', component: Prod... 阅读全文
posted @ 2018-04-21 20:42 chester·chen 阅读(474) 评论(0) 推荐(0)
摘要: 参数订阅: 参数快照: 阅读全文
posted @ 2018-04-21 19:15 chester·chen 阅读(235) 评论(0) 推荐(0)
摘要: 页面不存在 阅读全文
posted @ 2018-04-21 18:23 chester·chen 阅读(123) 评论(0) 推荐(0)
摘要: 第一步:引入其他组件 ngFor指令与数据绑定(数据驱动视图) 父组件穿值到自组建 阅读全文
posted @ 2018-04-20 18:19 chester·chen 阅读(187) 评论(0) 推荐(0)
摘要: 第一步 --save:自动写入package.json 第二步: 第三部: 为了让typescript识别$ 第四步: 阅读全文
posted @ 2018-04-20 14:28 chester·chen 阅读(138) 评论(0) 推荐(0)
摘要: 第一步: .angular-cli.json 第二步: 第三步: 第四步: 第五步: 阅读全文
posted @ 2018-04-20 13:30 chester·chen 阅读(177) 评论(0) 推荐(0)