角度注入
用于角度相关性注入的角度装饰器。
安装
$ npm install --save angular-inject
用法
// ES2016 style
import {inject} from 'angular-inject'
// CommonJS style
let inject = require('angular-inject').inject;
@inject( ['$base64', 'foobar'] )
class FooBarController {
constructor(){ /if needed you can also access the injected variables here also (ie constructor(base64, foobar) )
....
....
...