ng effects
1.0.0
บันทึก | ที่เก็บนี้ไม่ได้รับการดูแลอีกต่อไป เรื่องราวยังคงดำเนินต่อไปที่ API องค์ประกอบเชิงมุม |
ระบบปฏิกิริยาสำหรับเชิงมุม ขึ้นอยู่กับ Vue Composition API
API Reference ⚡ Stackblitz Changelog
บันทึก | กำลังมองหาเอกสาร (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