Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
A-JIE committed May 10, 2017
1 parent f5b7aa3 commit 5e62bd8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,20 @@ RxEmitter.emit("EVENT_NAME",{a:1,b:2});
import { RxEmitter } from 'rxemitter';
...

//on
RxEmitter.on('ADD_AN_NUMBER').subscribe(x=> console.log(`ADD A NEW NUMBER - ${x}`))
/** on */
RxEmitter.on('ADD_AN_NUMBER').subscribe(x=> console.log(`ADD A NEW NUMBER - ${x}`));

or

@RxOn("ADD_AN_NUMBER")
value:Observable<number>;

or

@RxSubscribe("ADD_AN_NUMBER")
subscribe(value:number){
console.log(value);
}
```

##### Rxemitter can be used for Angular2+、React、Vue and so on.
Expand Down

0 comments on commit 5e62bd8

Please sign in to comment.