r/javascript • u/theodorejb • Feb 05 '16
Angular 1.5.0 has been released
http://angularjs.blogspot.com/2016/02/angular-150-ennoblement-facilitation.html7
u/TheDruidsKeeper Feb 06 '16
Does this not include the promised new component router then? It wasn't in the notes.
1
u/benthepoet Feb 06 '16
Was wondering the same thing. They were touting it for a while and then suddenly seems like it dropped off the radar and there hasn't really been any official mention of it.
1
u/TheDruidsKeeper Feb 07 '16
Yes, same thing I noticed. It's sad because I'm really looking forward to using it.
6
u/taiga27 Feb 06 '16
That's great, I didn't think Angular 1.x would receive any more updates after Angular 2 and since I'm more proficient with it, I'd still use it for simpler projects/tight deadlines where setting up an isomorphic JS app would be too much trouble.
0
Feb 06 '16
[deleted]
3
u/taiga27 Feb 06 '16
I agree. And that's why I won't be learning Angular 2 anytime soon. Too much to learn at once, just let me live a little for Christ's sake. I just started feeling comfy with React/Redux.
2
u/campbeln Feb 05 '16 edited Feb 05 '16
Have they fixed the issue with ng-options/select's ng-models value comparisons? A change with 1.4+ was to always have:
<option value="2">Two</option>be === "2" as all underlying values are strings (fair enough) rather than == 2 as per <1.4. The problem is none of our non-string bound selects are binding anymore because 2 !== "2".
From == to === is a good change, but it seems the Angular team hasn't bothered to coerce the left-hand side of the expression into a string but has left that on us as devs to do it?! Really? So I have to change ALL of my APIs rather than the Angular team adding value + '' on the left?
I'm working on a major Australian government system that uses Angular and we are unable to upgrade past 1.3 currently because of this problem. Or have we managed to miss an easy fix for this issue?
Here's an extremely simplified example of the issue we're experiencing:
<script>
$scope.data = { age: 2 };
<script>
<select ng-model="data.age">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>Angular 1.3 binds the select without issue, while 1.4+ does 2 === "2" et'al and of course doesn't find a match and leaves the select as blank. How have the rest of you guys fixed this in 1.4+?
1
u/brianvaughn Feb 06 '16
Part of me hopes not... Else I can look forward to a series of new bugs reported against form-for if they change select/options.
0
Feb 05 '16
[deleted]
1
u/campbeln Feb 06 '16
But you can't do this if you're doing something stupid like returning a new object from a function call (e.g.
ng-options='item in myFunct()'). Then you try and usetrack bybut that cannot be used withselects (as in the horrible ng-options version, not HTML DOM objects). What may* get us around it is to cache the results from the first call so that all references are the same and we won't needtrack by, but I'm not sure that will work in all cases in our system.1
u/treetimes Feb 06 '16
You could always make your function act on a persistent scope reference rather than create a new object.
0
Feb 06 '16
[deleted]
4
u/mordocai058 Feb 06 '16
1.5 is designed to help you migrate to 2.0 and will probably be the last 1.x release. They expect people to move to 2.x "soon"
5
u/AlGoreBestGore Feb 06 '16
They always talk about how they'll keep the 1 branch up for a while. Also I doubt the "soon" part, because Angular 2 is still in beta and having all the 3rd party components migrate to 2 is definitely going to take a while.
4
u/wreckedadvent Yavascript Feb 06 '16
With the number of angular 1 users, I would be shocked if someone didn't fork it and continue to maintain it if they decided to stop updating it. That's pretty much exactly what happened with IE8 support.
1
u/dmitri14_gmail_com Feb 10 '16
Is there any official fork to support ie?
1
u/wreckedadvent Yavascript Feb 10 '16
Nothing official! But you can get 1.3 and 1.4 in a community-maintained ie8 build.
1
3
4
Feb 06 '16
there's been an issues tracker for a 1.6 milestone for a while https://github.com/angular/angular.js/milestones/1.6.x
1
12
u/wreckedadvent Yavascript Feb 05 '16 edited Feb 05 '16
Awesome. The new
componentis a lot more simple-looking. Transclusion slots and one-way bindings are huge improvements.Really good release.