I was trying to convert all my ember-component into OCTANE version. But I got a bigger doubt. How can I convert the observer
code into an OCTANE version? For example,
parent.hbs
<Child @value= />
child.hbs
<div></div>
child.js
export default class ChildComponent extends Component {
/** Previous code: sample code only
valueUpdate: observer('value', function() {
this.newValue = this.value / 12 * 2;
})
*/
}
How can I update the observer into octane way? Any idea please...
Note: I tried using '@observer' but it didn't work inside the component.
Aucun commentaire:
Enregistrer un commentaire