Skip to content

Commit

Permalink
added conceal doc
Browse files Browse the repository at this point in the history
  • Loading branch information
PillowPillow committed Aug 14, 2015
1 parent 5c8cd84 commit 4760fb4
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This library was build with webpack in mind but should work well with the other
* [@inject](#d_inject)
* [@autobind](#d_autobind)
* [@attach](#d_attach)
* [@conceal](#d_conceal)
* [Components](#components):
* [@controller](#d_controller)
* [@service](#d_service)
Expand Down Expand Up @@ -189,6 +190,40 @@ export default class CommunicationService {
}
````

###<a name="d_conceal">`@conceal`<a>
> declares the annotated property as private
#### type: *statement*
#### target: *methods and attributes*
#### Usage:
````javascript
import {factory, inject, attach, conceal} from 'node_modules/ng-annotations';

@factory()
@inject('$http')
export default class UserFactory {

@conceal
@attach('$http')
$http

@conceal
datas = [];

constructor(timeout) {
this.datas = [1,2,3];
}

method() {
return this.privateMethod();
}

@conceal
privateMethod() {}
}
````


###<a name="d_autobind">`@autobind`<a>
> The autobind annotation gives the possibility to bind methods to its current context.
> similar to *object.method.bind(object)*
Expand Down

0 comments on commit 4760fb4

Please sign in to comment.