Releases: PillowPillow/ng-annotations
Releases · PillowPillow/ng-annotations
v1.0.4
v0.1.12
0.1.12 (2015-08-20)
Update:
the $stateful property is now deprecated
use the stateful parameter instead
before
import {filter, inject} from 'node_modules/ng-annotations';
@filter('statefulFilter')
@inject('someDependency')
class StatefulFilter {
$stateful = true;
$filter(input) {
return input; //do something with the dependency
}
}
after
import {filter, inject} from 'node_modules/ng-annotations';
@filter({name: 'statefulFilter', stateful:true})
@inject('someDependency')
class StatefulFilter {
$filter(input) {
return input; //do something with the dependency
}
}
v0.1.10
0.1.10 (2015-08-14)
@conceal: [new feature]
the conceal decorator is now available.
it provides a way to declare the class members as private.
import {factory, inject, conceal} from 'node_modules/ng-annotations';
@factory()
@inject('$http')
class MyFactory {
@conceal
@attach('$http')
$http
@conceal
datas = [];
getDatas() {
return this.datas;
}
}
import {service, inject} from 'node_modules/ng-annotations';
@service()
@inject(MyFactory)
class MyService {
constructor(myFactory) {
myFactory.$http; // not defined
myFactory.datas; // not defined
myFactory.getDatas; // defined
}
}