3 ms·
Bad example, checkout mobx or core-decorators. @computed get value() { return this.a + 1; } @readonly bar = 5;
by solidr53 9y ago
Bad example, checkout mobx or core-decorators.
@computed get value() { return this.a + 1; }
@readonly bar = 5;
- RonanTheGrey 9y agoThe use of decorators in Anguar 2/4 is also very well done, IMHO. They allow your class to focus on its business logic, rather than the minute details of how Angular expects it to interact with the rest of Angular. There's a reason all the most common languages have them, concealing complexity is a way to reduce cognitive overload and therefore, bugs.