I am trying with the first directive I ever create, but I received the follow errors.
var directives = angular.module('testApp', []);
directives.directive('ratings', function () {
return {
restrict: 'A',
link: function (scope, elem, attrs) {
console.log("Recognized the ratings directive usage");
}
};
});
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
I put the file under directives subfolders , and here is my folder structure.
directives
controllers
services
Anything wrong with my code?