michaelbromley / michaelbromley/angular-es6
How to use ES6 classes to use $onChange component hook
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 364
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
I am battling getting $onChange to work (I can get $onInit to fire just fine).
Here is a portion of my ES6 class (which is my controller)
```
export default class ComplimentsController {
constructor() {
console.log('constructor')
}
$onInit() {
console.log('this fires as expected')
}
$onChange(value) {
console.log('this doesnt fire');
}
}
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides only an ES6 controller snippet and no repository file or test. Begin by tracing how the AngularJS component is registered and how its lifecycle hooks are wired, then define reproducible expected behavior for $onChange before making any change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angularjs, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100