Thanks for sharing,
Marcello
2011/10/28 Igor Minar <ig...@angularjs.org>:
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to
> angular+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/angular?hl=en.
>
Awesome! Just tweeted a link to the Github project.
-Daniel
What would be required to get this to run under apache web server? I don't have Node JS running.
Thanks.
Nolan
Andrew McElroy
thanks for your email.
I would prefer to not have to install anything (if that's at all possible). In looking at the code in the public folder it appears that I should be just be able to load the app via - http://127.0.0.1/angular-peepcode/public/index.html
This loads, but without data or controls. Am I missing something?
Cheers,
Nolan
Curious if this jibes with best practices, etc. This is my
interpretation of how it should come together.
On Oct 28, 1:39 am, Igor Minar <i...@angularjs.org> wrote:
> Hi Guys,
>
> I rewrote PeepCode's Backbone Tunes app with AngularJS and was a bit
> surprised by how well Angular compares to Backbone.
>
> If you haven't seen PeepCode's screencasts, I recommend that you check them
> out:http://peepcode.com/products/backbone-jsandhttp://peepcode.com/products/backbone-ii
-- Miško
@player = @$parent.$new PlayerThese two changes result in two issues:
1/ each time the controller is instantiated a new player object is created. (this is not a big deal for the current version of the app, but if $route was used to create multiple views you'd lose the playlist state, etc when you navigate between routes.2/ you are not leveraging DI to make it easy to swap in a fake player object in tests. Again, this is not a big issue for this app because it's so simple, but since you want to know what the best practice is, then avoiding issues like this one is one of them.otherwise the code looks ok.it looks like coffee script didn't buy you that much here though since even the original code was quite compact.cheers,Igor
Thanks so much for your feedback. A revised version taking your
suggestions is over at: https://gist.github.com/1401821 (leaving up
original gist for my public shaming :)). Once again let me know if I
am straying from angularjs philosophy.
Changes I made are:
1) removed instantiation from TunesCtrl constructor and using
injection
2) re-added player service: angular.service 'player', -> @$new Player
3) Made Player class private to module (shouldn't have been exposed in
first place)
----------------------------------
I agree that CS doesn't add too much to the already terse angular
style but I want to learn semantic for it because
1) Still saves ~20% of LOC (viewed in terms of a workweek that means
fridays off :))
2) Is somewhat "politically unnegotiable" for the Rails ecosystem
3) Peepcode's Backbone Part 3 is in Coffeescript (this is the most
importatant reason IMHO - it was a retweet to your peepcode example
that brought me to angular in the first place, after having bought/
viewed the Peepcode screencasts).
4) Troll opinion - I think the classes make it purtier for those who
haven't read Crockford (though obviously devs should know what's going
on in JS before using CS).
> >http://peepcode.com/products/backbone-jsandhttp://peepcode.com/produc...
Igor-
Thanks so much for your feedback. A revised version taking your
suggestions is over at: https://gist.github.com/1401821 (leaving up
original gist for my public shaming :)). Once again let me know if I
am straying from angularjs philosophy.
Changes I made are:
1) removed instantiation from TunesCtrl constructor and using
injection
2) re-added player service: angular.service 'player', -> @$new Player
3) Made Player class private to module (shouldn't have been exposed in
first place)
----------------------------------
I agree that CS doesn't add too much to the already terse angular
style but I want to learn semantic for it because
1) Still saves ~20% of LOC (viewed in terms of a workweek that means
fridays off :))
2) Is somewhat "politically unnegotiable" for the Rails ecosystem
3) Peepcode's Backbone Part 3 is in Coffeescript (this is the most
importatant reason IMHO - it was a retweet to your peepcode example
that brought me to angular in the first place, after having bought/
viewed the Peepcode screencasts).
4) Troll opinion - I think the classes make it purtier for those who
haven't read Crockford (though obviously devs should know what's going
on in JS before using CS).
On Nov 28, 5:34 pm, Igor Minar <i...@angularjs.org> wrote:
> On Mon, Nov 28, 2011 at 12:31 PM, Nate Kidwell <natekidw...@gmail.com>wrote:
>
> > Igor-
>
> > Thanks so much for your feedback. A revised version taking your
> > suggestions is over at:https://gist.github.com/1401821(leaving up