1.

Differentiate between expressions of AngularJS and JavaScript.

Answer»

AngularJS expressions are placed INSIDE double curly BRACES {{expression}} similar to JavaScript. The main DIFFERENCES between them are:

AngularJS expressionsJavaScript expressions
The expressions are EVALUATED against the scope object that they are part of.The expressions are evaluated against the global window scope.
Expression evaluation nature is forgiving. If something goes wrong, it returns null or undefined.JavaScript expressions are not forgiving in nature and return an error.
Here, loops and conditional statements cannot be ADDED as part of expressions. Loops and conditional statements can be part of JavaScript expressions.


Discussion

No Comment Found