上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 43 下一页
摘要: 点我 import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-bind', templateUrl: './bind.component.html', styleUrls: ['./bind.component.css'] }) export class BindComponen... 阅读全文
posted @ 2018-04-23 10:09 chester·chen 阅读(156) 评论(0) 推荐(0) 编辑
摘要: import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { Product1Component } from './product1/pr... 阅读全文
posted @ 2018-04-22 12:25 chester·chen 阅读(772) 评论(0) 推荐(0) 编辑
摘要: import { Injectable } from '@angular/core'; @Injectable() export class LoggerServiceService { constructor() { } log(message: string) { console.log(message); } } import { Injectable } ... 阅读全文
posted @ 2018-04-22 12:08 chester·chen 阅读(189) 评论(0) 推荐(0) 编辑
摘要: import { Injectable } from '@angular/core'; import { ProductServiceService, Product } from './product-service.service'; @Injectable() export class AnotherProductServiceService implements ProductServ... 阅读全文
posted @ 2018-04-22 11:50 chester·chen 阅读(123) 评论(0) 推荐(0) 编辑
摘要: import { Injectable } from '@angular/core'; @Injectable() export class ProductServiceService { constructor() { } getProduct(): Product { return new Product(1, "iPhone7"); } } export cl... 阅读全文
posted @ 2018-04-22 11:46 chester·chen 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-04-22 11:23 chester·chen 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(431) 评论(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 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-04-21 21:49 chester·chen 阅读(117) 评论(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 阅读(121) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 43 下一页