I am new to angular JS and trying to use Directives.
Below is the code for directive :
app.directive('appInfo', function() {
return {
restrict: 'E',
scope: {
info: '='
},
templateUrl: 'js/directives/appInfo.html'
};
});
Below is my main JS:
app.controller('MainController', ['$scope', function($scope) {
$scope.apps = [
{
icon: 'img/move.jpg',
title: 'MOVE',
developer: 'MOVE, Inc.',
price: 0.99,
info: "move"
}
]
}]);
Now, when i am trying to use this in html i am getting very bad error that ia ma unable to under stand :
<div class="card" ng-repeat = "app in apps">
<app-info info="{{ app.info }}"></app-info>
</div>
[$parse:syntax] http://errors.angularjs.org/1.3.5/$parse/syntax?p0=%7B&p1=invalid%20key&p2=2&p3=%7B%7B%20app.info%20%7D%7D&p4=%7B%20app.info%20%7D%7D