README.adoc
May 31, 2021 · View on GitHub
:toc: :toc-placement!:
NOTE: This repository is no longer maintained. The story continues at link:https://github.com/mmuscat/angular-composition-api[Angular Composition API].
[.text-center] image::https://i.imgur.com/ty4iIj3.png[alt=Angular Effects]
++++
Reactivity system for Angular. Based on Vue Composition API.
📝 API Reference ⚡ StackBlitz ⭐ Changelog
++++
NOTE: Looking for the previous (9.0.x) docs? https://github.com/stupidawesome/ng-effects/tree/master/docs[Click here].
[source, typescript]
@Component({
selector: "app-root",
inputs: ["count"],
outputs: ["countChange"]
})
export class AppComponent extends defineComponent(() => {
const count = ref(0)
const countChange = new EventEmitter
function increment() {
count.value += 1
}
watchEffect(() => {
countChange.emit(count.value)
})
return {
count,
countChange,
increment,
}
}) {}
Installation
link:https://www.npmjs.com/package/ng-effects[Install via NPM]
npm install ng-effects