AngularJS : Differences among = & @ in directive scope? [duplicate]

This can be confusing but hopefully a simple example will clarify it. First, let’s separate model bindings from behaviors. Here is a fiddle that should help tie things together: http://jsfiddle.net/jeremylikness/3pvte/ And explained … if your directive looks like this: <my-directive target=”foo”/> Then you have these possibilities for scope: { target : ‘=’ } This will … Read more

What is the difference between ‘@’ and ‘=’ in directive scope in AngularJS?

Why do I have to use “{{title}}” with ‘@‘ and “title” with ‘=‘? @ binds a local/directive scope property to the evaluated value of the DOM attribute. If you use title=title1 or title=”title1″, the value of DOM attribute “title” is simply the string title1. If you use title=”{{title}}”, the value of the DOM attribute “title” … Read more