Reputation: 191
In AngularJS, does adding spaces around the expression inside the double curly braces like this {{ expression }}
rather than this {{expression}}
change anything?
I'm currently going through this tutorial and this test doesn't pass when putting spaces, but by removing them, it passes.
Upvotes: 1
Views: 1854
Reputation: 125
It doesn't matter if you have spaces in ng-bind view. (ng-bind view is the {{ }})
Upvotes: 0
Reputation: 4974
{{}}
is just a shortcut for the ng-bind
directive which sets up a one way binding between the controller and the view, spaces or not does not matter
Upvotes: 1
Reputation: 17334
It makes no difference apart from semantics, its the same as
['hello', 'world']
['hello','world']
Upvotes: 1