摘要:
一、依赖注入 1. 创建工程 ng new myangular 2. 创建组件 ng g componet product1 3. 创建服务 ng g service shared/product 如下图 4.服务的代码 product.service.ts 定义了一个Product类,并且在Pro 阅读全文
posted @ 2017-07-27 17:16 work hard work smart 阅读(534) 评论(0) 推荐(0)
|
|||
|
摘要:
一、依赖注入 1. 创建工程 ng new myangular 2. 创建组件 ng g componet product1 3. 创建服务 ng g service shared/product 如下图 4.服务的代码 product.service.ts 定义了一个Product类,并且在Pro 阅读全文
posted @ 2017-07-27 17:16 work hard work smart 阅读(534) 评论(0) 推荐(0) |
|||