ng effects
1.0.0
注記 | このリポジトリは維持されなくなりました。ストーリーは、Angular Composition APIで続きます。 |
角度の反応性システム。 Vue Composition APIに基づいています。
APIリファレンス⚡スタックブリッツチャンログ
注記 | 以前の(9.0.x)ドキュメントをお探しですか?ここをクリック。 |
@ Component ( {
selector : "app-root" ,
inputs : [ "count" ] ,
outputs : [ "countChange" ]
} )
export class AppComponent extends defineComponent ( ( ) => {
const count = ref ( 0 )
const countChange = new EventEmitter < number > ( )
function increment ( ) {
count . value += 1
}
watchEffect ( ( ) => {
countChange . emit ( count . value )
} )
return {
count ,
countChange ,
increment ,
}
} ) { } NPM経由でインストールします
npm install ng-effects