I've been reading the AngularJS docs and found something that I still don't understand:
For cases where the attribute name is the same as the value you want to bind to inside the directive's scope, you can use this shorthand syntax:
...
scope: {
// same as '=customer'
customer: '='
},
...
Looking at the final example (my-tabs/my-pane) the code is this one:
.directive('myPane', function() {
return {
require: '^myTabs',
restrict: 'E',
transclude: true,
scope: {
title: '@'
},
link: function(scope, element, attrs, tabsCtrl) {
tabsCtrl.addPane(scope);
},
templateUrl: 'my-pane.html'
};
});
I've tried to change the '@' by '=' and the example breaks. So what is doing '@'? And why '=' neither '=title' are not working here?