
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@angularclass/observe-decorators
Advanced tools
Reactive Angular 2 Observe Decorators by @AngularClass
Reactive Observe Decorators
@ObserveViewChild
@ObserveViewChildren
@ObserveContentChild
@ObserveContentChildren
All you need to do is set these values to an EventEmitter instance for example.
//normal component with @Output event
@Component({
selector: 'incrementer',
template: `
<div>
<button (click)="increments.emit(1)">increment</button>
</div>`
})
class Incrementer {
@Output() increments = new EventEmitter();
}
@Component({
selector: 'angularclass-app',
directives: [ Incrementer ],
template: `
<div>
<h4>Child Total Count: {{ counter }}</h4>
<incrementer></incrementer>
<button #decrement>decrement</button>
</div>
`
})
export class AngularclassApp {
//query and listen to component output
@ObserveViewChild(Incrementer) increments = new EventEmitter(); // same as ViewChild but you can use it now as an EventEmitter
//query and listen to a DOM element
@ObserveViewChild('decrement', 'click') decrements = new EventEmitter();
}
we also get redux for free
//normal component with @Output event
@Component({
selector: 'incrementer',
template: `
<div>
<button (click)="increments.emit(1)">increment</button>
</div>`
})
class Incrementer {
@Output() increments = new EventEmitter();
}
@Component({
selector: 'angularclass-app',
template: `
<div>
<h4>Total Count: {{ counterChange }}</h4>
<incrementer></incrementer>
<button #decrement>decrement</button>
</div>
`,
directives: [Incrementer]
})
export class AngularclassApp {
//query and listen to component output
@ObserveViewChild(Incrementer) increments = new EventEmitter();
//query and listen to a DOM element
@ObserveViewChild('decrement', 'click') decrements = new EventEmitter();
// Notice how we're able to just return an Observable
counterChange = Observable.merge(
this.increments,
this.decrements.mapTo(-1)
)
.startWith(0)
.scan((total, value) => total + value, 0);
}
Rob Wormald from the Angular team and ngrx team Proposal: Support declarative binding from View events to Observables
enjoy — AngularClass
Learn AngularJS, Angular 2, and Modern Web Development from the best. Looking for corporate Angular training, want to host us, or Angular consulting? patrick@angularclass.com
Apache-2.0
FAQs
Reactive Angular 2 Observe Decorators
The npm package @angularclass/observe-decorators receives a total of 3 weekly downloads. As such, @angularclass/observe-decorators popularity was classified as not popular.
We found that @angularclass/observe-decorators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.