Skip to content

Releases: PillowPillow/ng-annotations

v1.0.4

25 Feb 13:09
Compare
Choose a tag to compare
update dist files

v0.1.12

20 Aug 12:39
Compare
Choose a tag to compare

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

20 Aug 18:18
Compare
Choose a tag to compare

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
    }

}

v0.1.9

20 Aug 18:19
Compare
Choose a tag to compare

0.1.9 (2015-08-12)

Bugfix:

now supports correctly the bindings without second parameter

import {controller, inject} from 'node_modules/ng-annotations';
import MyFactory from './myFactory';

@controller()
@inject(MyFactory)
export default class MyCtrl {
    @attach(MyFactory)
    factory;
}