If using with Django, is it possible to change the {{}} to something else?
Everything you need to understand to start with AngularJS
21–30 of 31 posts
Re: Everything you need to understand to start with AngularJS
#22If using with Django, is it possible to change the {{}} to something else?
I also describe how to display the '{{' and '}}' strings in Jinja2, which is comically non-trivial :D
[1]: http://www.verdantrefuge.com/writing/2013/angularjs-custom-s...
Re: Everything you need to understand to start with AngularJS
#23And to learn more, go here http://egghead.io
Re: Everything you need to understand to start with AngularJS
#24If using with Django, is it possible to change the {{}} to something else?
I don't know if it's possible but, in general, it's not a good idea to mix server-side and client-side templating. The Angular guys discuss this in one of the videos on the Angular channel (I found it for you here: http://www.youtube.com/watch?feature=player_detailpage&v... ). The two reasons seem to be first, it's not clean and second, it's easy to introduce security issues. If I want to have a page that has both se…
Re: Everything you need to understand to start with AngularJS
#25> In those expressions, you have access to Javascript code Just to clarify, double curly expressions in Angular, {{ }}, are "JS-like", basically a subset of JS + filter syntax. One goal of the expression syntax is to prevent a lot of app logic being stuck into the template itself, so the subset of JS is fairly minimal, but this is by design. This also means that the expressions are not eval()'d. Instead, they are par…
Re: Everything you need to understand to start with AngularJS
#26Too bad it's relying on (blurry) snapshots vs. https://code.google.com/p/google-code-prettify
Re: Everything you need to understand to start with AngularJS
#27> In those expressions, you have access to Javascript code Just to clarify, double curly expressions in Angular, {{ }}, are "JS-like", basically a subset of JS + filter syntax. One goal of the expression syntax is to prevent a lot of app logic being stuck into the template itself, so the subset of JS is fairly minimal, but this is by design. This also means that the expressions are not eval()'d. Instead, they are par…
I'm curious about the speed hit of these parsed expressions. Do you know if they are pre-compiled into anonymous functions, or if they are parsed on the fly?
Re: Everything you need to understand to start with AngularJS
#28> In those expressions, you have access to Javascript code Just to clarify, double curly expressions in Angular, {{ }}, are "JS-like", basically a subset of JS + filter syntax. One goal of the expression syntax is to prevent a lot of app logic being stuck into the template itself, so the subset of JS is fairly minimal, but this is by design. This also means that the expressions are not eval()'d. Instead, they are par…
I'm curious about the speed hit of these parsed expressions. Do you know if they are pre-compiled into anonymous functions, or if they are parsed on the fly?
Looks like they are never interpreted, but there are (at least) two different compilation strategies: 1) Anonymous function with a loop 2) Fully compiled Function constructed via JavaScript source with the loop unrolled In general, this bit of code seems to be optimized to a crazy degree.
It's also worth noting that the "filters" part of the expression is maintained as a pipeline in an array, since filters may inform bidiectional binding behavior.
Re: Everything you need to understand to start with AngularJS
#29And to learn more, go here http://egghead.io
Re: Everything you need to understand to start with AngularJS
#30Too bad it's relying on (blurry) snapshots vs. https://code.google.com/p/google-code-prettify
The blurry part isn't so nice, but I think that have snapshots of code might actually be better in a lot of ways if it forces people to type code out themselves without copy/paste (no better way to learn than to get it into your muscle memory after all).