r/angularjs • • Feb 05 '16

Angular 1.5 released!

https://github.com/angular/angular.js/blob/master/CHANGELOG.md?=1.5
96 Upvotes

36 comments sorted by

View all comments

4

u/AlGoreBestGore Feb 05 '16

Was excited by multiple transclusion, but I just saw this:

$compile: add one-way binding to the isolate scope definition

Which means, as I understand it, that we can use "<" to bind changes similarly to "=", but without accidentally changing the value in the controller via the directive!

5

u/toddmotto Feb 05 '16

Yup, although it has caveats (such as primitives/object bindings and references). I've just posted a write-up tutorial explaining this, with live embeds on one-way bindings in 1.5: https://toddmotto.com/one-way-data-binding-in-angular-1-5

1

u/immigrantnightclub Feb 06 '16

Thanks for writing this!

1

u/AlGoreBestGore Feb 06 '16

Yeah, nothing you can do about objects really (apart from copying them), but that was kind of expected. I remember being surprised that "=" was doing it with strings and integers though.