![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ng2-核心API
张大伟的博客
就这样拉,码农而已
展开
-
@Injector
功能: 注入依赖接口 如何使用: const injector: Injector = ...; injector.get(...);代码预览:class Injector {staticTHROW_IF_NOT_FOUND : _THROW_IF_NOT_FOUNDstaticNULL : Injectorget(token: any, notFoundValue?: any) :原创 2017-03-20 17:16:24 · 759 阅读 · 0 评论 -
Angular2核心组件@Component
功能: 利用Angular的component创建一个class,并且在这个component中集中配置元数据(metadata);如何使用?import { Component } from '@angular/core';@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls翻译 2017-03-20 18:30:34 · 10274 阅读 · 0 评论