

AngularJS 1.2.0: timely-delivery - jbdeboer
http://blog.angularjs.org/2013/11/angularjs-120-timely-delivery.html

======
eknkc
"This commit introduces the notion of "private" properties (properties whose
names begin and/or end with an underscore) on the scope chain. These
properties will not be available to Angular expressions."

I wish they'd discuss stuff like this and I wish that MongoDB did not store
primary keys on _id field.

I blame myself though.

~~~
jbdeboer
This change was discussed:
[https://github.com/angular/angular.js/pull/4509](https://github.com/angular/angular.js/pull/4509)

It is also clear from the discussion that there are dissenting opinions -- we
are constantly iterating and welcome issues and pull requests to make features
work even better. The best way to influence AngularJS is to send a pull
request.

~~~
eknkc
You are right it was. But most people do not track all issues of all projects
they depend on. While I'd love to do that, there's simply not much time.

I belive this should have been in an earlier RC or Beta. This way, more people
would have tested ot, ir got a chance to read changelog (I follow the blog and
check each beta release). If that window was missed, it should have gone for
the next major release.

What I see is that Google announced AngularDart
([http://news.dartlang.org/2013/11/angular-announces-
angularda...](http://news.dartlang.org/2013/11/angular-announces-
angulardart.html)). Dart has _ prefix for private fields. Then AngularJS team
goes ahead and forces the same on the JS implementation.

Seems that there is always some political reason to mess with things at
Google.

~~~
Nitramp
Many other languages and projects use underscores to indicate private
properties, in particular Google's Closure. I also have no idea how
standardizing on _ in names meaning private would do anything to push Dart in
some hidden, evil agenda.

I think the change is reasonable, limiting AngularJS' expression to leak less
information into the templates is a good idea IMHO, as described in particular
with the new controller syntax.

Disclosure: I work at Google, but I have not been involved in this discussion
at all.

------
jayhuang
I'm really impressed with Angular.

I've previously worked with Backbone.js, and found that many things in
Backbone where I've had to manually develop are readily available in Angular.

Moving from Backbone to Angular has made the code much cleaner, and smaller in
size. Whereas in Backbone, the code slowly became a mess with all the event
listening and event triggering (probably my fault), in Angular, that has all
been abstracted for the most part.

Great work guys!

~~~
adamors
I'm really impressed as well, especially how helpful and outreaching the
developers/contributors are on sites like StackOverflow.

Now if the documentation would improve in some of the grayer areas, I would be
really happy. Wish I knew enough to contribute.

~~~
btford
We've been steadily working on improving the docs, and rolling out
significantly improvements on a regular basis. Is there any particular part of
the docs that still ails you?

~~~
crucialfelix
I like the new search bar a lot. it appears to be searching within the pages
themselves. so all pages are already in memory ?

[http://docs.angularjs.org/api/ng.directive:ngRepeat](http://docs.angularjs.org/api/ng.directive:ngRepeat)

I search "ng-val"...

------
ollysb
I've done one project with ember and was very happy with it but I'm now
working on a project where I only need parts of the page to be controlled by
the framework. So far I'm loving the way angular integrates with the dom but
once you get back to the controllers/directives it suddenly feels like I have
to do a whole lot more work than with ember. The main difference seems to be
that you have to manage updates yourself i.e. use $watch or trigger them
yourself by binding to js event. At this point I'm kind of wishing their was
an embular project ( :) ) that integrated with the dom the way angular does
but had ember's awesome binding/computed properties...

~~~
wldlyinaccurate
Can you give an example of where you've had to use $watch? Usually too many
$watch is an indication that you could improve your app's architecture, e.g.
by abstracting into directives.

FWIW I'm only speaking from personal experience and in your case lots of
$watch might be necessary.

~~~
ollysb
A good example is where I have a list of items which is filtered by a
select[1]. I have the select wired up to the controller with a two-way binding
and the controller watches for changes to the binding and filters the list
accordingly. Maybe this isn't an idiomatic way to do it?

[1]
[http://plnkr.co/edit/ykfblPHlwkBJyMeObFyV?p=preview](http://plnkr.co/edit/ykfblPHlwkBJyMeObFyV?p=preview)

~~~
olegbl
Here's your example without a watch:
[http://plnkr.co/edit/GCv7bQALiOTgJ0npavwi?p=preview](http://plnkr.co/edit/GCv7bQALiOTgJ0npavwi?p=preview)

~~~
ollysb
That looks interesting, so does the filter reevaluate automatically when any
of the variables used in the expression change?

edit: and thanks a lot for taking the time to look at it!

~~~
ollysb
Ah, so I see that anything associated to the scope is reavaluated whenever
anything else in the scope changes. Here's a further modification based on
yours that keeps the criteria on the controller.

[1]
[http://plnkr.co/edit/JYyUvyh30e5L9KwVjDW2?p=preview](http://plnkr.co/edit/JYyUvyh30e5L9KwVjDW2?p=preview)

[2]
[http://plnkr.co/edit/ffYb14JjgSip5BTITILS?p=preview](http://plnkr.co/edit/ffYb14JjgSip5BTITILS?p=preview)

edit: much happier with this version than the one I started with, thanks

edit: added example [2] which doesn't require a watch but still uses the
service to do the filtering (because in my app it's actually an ajax call)

------
mathrawka
With Javascript disabled the page is completely blank.

 _edit (bringing text from comment up a level):_

If you are building apps for people other than yourself, then having a banner
to notify them it won't work is better than a blank page.

A typical banner that I make includes the following things:

\- Positioned at the top via CSS and sticks there

\- Includes a link to [http://www.enable-javascript.com](http://www.enable-
javascript.com)

\- Includes a tracking image so I can see how many people are coming without
JS enabled

If you have a white page like this blog does, people will think your site is
broken and bounce... and may never come back.

~~~
treeface
Not sure what you were expecting. AngularJS apps aren't usually built with a
noJS fallback in mind.

~~~
e12e
Well, from the url:

[http://blog.angularjs.org/2013/11/angularjs-120-timely-
deliv...](http://blog.angularjs.org/2013/11/angularjs-120-timely-
delivery.html)

I was expecting a) a blog post, and b) from the .html-ending a hypertext
document, maybe with text and images?

What possible reason could there be for this to be "an app"? It's a blog, it's
for reading -- and you already need a reader to access it -- why would you
implement a (new) rendering engine?

Ok, I can see an argument for adding comments via javascript and a service, or
for posting blog posts and doing admin stuff. But the other reasons (user
tracking etc) for having this as "an app" only detracts from the readers
experience.

~~~
jessedhillon
Its Blogger -- doing it this way allows them to cache the viewer across their
thousands of blogs, and load only the content.

~~~
e12e
Well, if they just served html, they'd still only need to serve the content
(and the viewer, the web browser, would indeed be cached in the form of an
installed application on the end user's system).

~~~
jessedhillon
The content can be served as a JSON object containing just the post and the
metadata. If you scale up to millions of requests, suddenly you're saving a
lot of bandwidth by not sending the same header, sidebar, footer etc
everytime.

~~~
e12e
1) You could send the sidebar, footer etc _as_ json, and the content as html.
[edit: an by json I mean javascript ;-) or a combination of a script-tag with
a fancy-nav.js, and then pull in any additional elements via json/javascript
urls]

2) "lot of bandwidth" \- I doubt it. It's only the embedded html you'd have to
resend -- and that gets compressed with the rest of the main html document.
Everything else (images, css, javascript) gets cached via normal request
caching.

------
santialbo
We've been using rc versions in production code too. As they've mentioned many
times when they say unstable it doesn't mean that it was likely to break,
simply that they are free to change the API if they need too.

Does anyone know what's the rationale behind the separation of ngRoute? It's
less than 4KB and less than 2KB when gzipped. I don't think it's worth the
"pain" of having to remember to add another source file.

~~~
Guillaume86
They want to split in lot of optional modules, it's just the beginning. IMO
it's a good idea. For your problem, perhaps they should add a custom
build/download tool like jQueryUI.

~~~
troyk
I think it's a great idea as well. Would like to see jqLite come out as well
and be a separate project. Then those using jquery don't pay for jqLite, and
even beter, for a quick landing page I'd be inclined to use jqLite naked for a
nice tiny footprint.

------
angrycoder
Great timing. The angular based project I've been working on for the past 6
months just had a soft launch the other day. Being able to tell the powers
that be that we are no longer on the unstable branch will ease a few minds.

------
Bahamut
I noticed that Angular was likely to release this morning since all the issues
for the milestone was finally cleared out - looking forward to moving to 1.2
stable from 1.2 rc2 (we're using rc2 in production code!).

Also looking forward to seeing new Angular features being worked on again!

~~~
joshstrange
I'm using rc3 in production right now so I'm looking forward to testing this
out upgrading.

------
yesimahuman
Nice guys! I've been tracking the rc's with Ionic Framework
([http://ionicframework.com/](http://ionicframework.com/)) and just updated to
the final. I've especially loved ngAnimate and ngTouch which have been really
solid.

------
dan_sim
I just wrote a yeoman generator to bootstrap a phonegap application with
angular 1.2.0 : [https://github.com/dsimard/generator-angular-
phonegap](https://github.com/dsimard/generator-angular-phonegap)

~~~
dan_sim
Here is a video showing how to bootstrap an angular-phonegap application in 6
commands :
[http://www.youtube.com/watch?v=UXkLu7q4tq4](http://www.youtube.com/watch?v=UXkLu7q4tq4)

------
wnevets
Great timing, I'm starting the new version of an angular web app. Having a
production version of 1.2 on day one is great!

------
eliot_sykes
Any advice for upgrading to 1.2 from 1.0.x? Is it worth going via 1.1.x first?

------
ffrryuu
Sweet, looks like some major changes to the compilation in this one.

------
filipedeschamps
AngularJS is being one of the coolest thing since Node.js

~~~
pandeiro
In terms of cool it still has a lot of ground to cover to catch horsejs

~~~
filipedeschamps
Dude, seriously, what's this? Random horse tips using google voice? I can't
even understand those tips lol

~~~
saiko-chriskun
Sarcasm. Don't worry, it's new. You'll catch on.

------
hswolff
So exciting. Great work guys :)

------
ryankshaw
is there a road map for future things that want to be added to angular?

~~~
jbdeboer
Take a look at the pull request queue on Github. We've been focused on 1.2.
There are a lot of new features and proposals that we'll pick up now that the
release is out the door.

