Welcome to the AngularJS Expressions Homepage, Guest!


AngularJS | Expressions




AngularJS expressions can be written inside of double braces {{}}. The expression can be written inside of a directive; ng-bind = 'expression'. The expression will be dealt with by AngularJS, and then the result will be returned properly as written. AngularJS expressions are very similar to Javascript expressions. AngularJS expressions can contain literals, operators, and variables.

{{5 + 5 }}
or
{{ firstName + " " + lastName }}
or
{{ variable }}

Warning if you are using Flask, Django, or any other language with Jinja 2 built in, you should be wary of using the microframeworks with AngularJS. Since AngularJS and Jinja use the same notation. You can change the notation for Jinja or AngularJS using some script code, or you could pip install flask-triangle. It doesn't work the best, but it is a working solution. This will allow you to use the double curly brackets with a variable name | angular inside of them. The angular is to define that an angular variable is being used and not a jinja variable.













Next, we will take a look at the MVC Architecture of AngularJS

Just follow the buttons to continue the tutorial, Guest