Live data from Hacker News

AngularJS 1.2.0-rc1 released

blog.angularjs.org

21–30 of 39 posts

Re: AngularJS 1.2.0-rc1 released

#22
Interesting enough, looks like there are changes to routeProvider that's causing injection to failed. Unfortunately, not a drop in replacement from 1.1.5. Anyone else experiencing same issue?

Failed to instantiate module editor due to: Error: [$injector:unpr] Unknown provider: $routeProvider

Re: AngularJS 1.2.0-rc1 released

#23
post #22

Interesting enough, looks like there are changes to routeProvider that's causing injection to failed. Unfortunately, not a drop in replacement from 1.1.5. Anyone else experiencing same issue? Failed to instantiate module editor due to: Error: [$injector:unpr] Unknown provider: $routeProvider

Due to https://github.com/angular/angular.js/commit/5599b55b, you'll now need to explicitly include angular-route.js and add a dependency on ngRoute.

Re: AngularJS 1.2.0-rc1 released

#24
post #17

Earlier quoted context omitted.

`ng-repeat` and `ng-include` work fine for recursive data structures. http://jsfiddle.net/uXbn6/378/

I had that as a previous approach, actually. Creating two nested scopes for each item made debugging even harder. It would also be nice if it just did the expected thing out of the box. I can accept that there may well be sound technical reasons for the way it is, but I haven't seen any. All that happens when you raise this limitation is one of three things: 1. "Use ngIf". 2. "Use ngInclude". 3. "Write your own direc…

Can you include a sample of a template with your custom directive? I'm not sure what the expected thing out of the box would be. (not the code of the directive, just the use)

Re: AngularJS 1.2.0-rc1 released

#25
post #24

Earlier quoted context omitted.

I had that as a previous approach, actually. Creating two nested scopes for each item made debugging even harder. It would also be nice if it just did the expected thing out of the box. I can accept that there may well be sound technical reasons for the way it is, but I haven't seen any. All that happens when you raise this limitation is one of three things: 1. "Use ngIf". 2. "Use ngInclude". 3. "Write your own direc…

Can you include a sample of a template with your custom directive? I'm not sure what the expected thing out of the box would be. (not the code of the directive, just the use)

Here's the original article I took inspiration from:

http://sporto.github.io/blog/2013/06/24/nested-recursive-dir...

I've modified it a bit to add a $watchCollection listener. So when a recursive array is updated, it deletes a child OL and then recompiles again:

https://gist.github.com/jchester/6227865

I don't particularly like the fact that this creates a dependency on jQuery (through .empty()).

There are other approaches where the recursion is sorta-kinda-but-not-really built into a single directive:

https://gist.github.com/furf/4331090

https://github.com/eu81273/angular.treeview

Edit: I guess what I wished for would be something like this --

    {{foo}}
or

    {{foo}}
or

    {{foo}}
Whichever is easiest to get into the mainline code.

Re: AngularJS 1.2.0-rc1 released

#26
post #23
post #22

Interesting enough, looks like there are changes to routeProvider that's causing injection to failed. Unfortunately, not a drop in replacement from 1.1.5. Anyone else experiencing same issue? Failed to instantiate module editor due to: Error: [$injector:unpr] Unknown provider: $routeProvider

Due to https://github.com/angular/angular.js/commit/5599b55b , you'll now need to explicitly include angular-route.js and add a dependency on ngRoute.

ah. cool. I remember seeing it somewhere. thanks for the tip.

Re: AngularJS 1.2.0-rc1 released

#28
post #11
post #7

What's the best way to install this with bower?

Actually, there is a faster way than bower! 1. Download (or point to) https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/ang... 2. You're done

Some people use bower as part of the stack and process I'm sure they have no problem locating the download link.

Re: AngularJS 1.2.0-rc1 released

#29
post #6

Using Angular was a huge pleasure for developing a Chrome Packaged App in every way but one. Documentation. It isn't sexy to write docs; as a developer you don't get that feeling of 'shipping code', but it is one of the most important parts of an open source library. Knowing that your question is always a google away (not a 'I hope someone asked this on StackOverflow' away) is important and I hope they improve in thi…

My favorite Angular doc page: http://docs.angularjs.org/api/ng.directive:ngModel

Funny that your link was light-gray in color when I loaded these comments (meaning that I, too, once went to that page looking for documentation).

Re: AngularJS 1.2.0-rc1 released

#30
post #6

Using Angular was a huge pleasure for developing a Chrome Packaged App in every way but one. Documentation. It isn't sexy to write docs; as a developer you don't get that feeling of 'shipping code', but it is one of the most important parts of an open source library. Knowing that your question is always a google away (not a 'I hope someone asked this on StackOverflow' away) is important and I hope they improve in thi…

It's not the best but I've actually not had too much trouble with the docs. I found the trick is to read the guides first, once you understand the principles that Angular.JS works on the terse reference docs are much more approachable.

A little linking would go a long way though. For example that ngModel page really needs to link to NgModelController!

Post reply on HN