angular-social
angular-social copied to clipboard
Error on link function angularjs 1.3.13
Hi,
I got an error on link function of all directive : actually, the controller ctrl is passed but it does not reference the controller "controller" it's an empty shell. So when ctrl.init() is called in the link function i got on all link functions:
TypeError: undefined is not a function at link (http://localhost:3000/bower_components/angular-social/angular-social.src.js:341:18) Thanks in advance
I'm seeing this issue, too. I'm using Angular 1.3.15
.
Same for me, AngularJS 1.3.15
The issue seems to be that in the various scripts such as 02-facebook.js, 03-twitter.js, on the last line of the link function, it tries to call the ctrl.init
function which is undefined.
For example in 02-facebook.js:
link: function(scope, element, attrs, ctrl) {
element.addClass('ng-social-facebook');
if (!ctrl) {
return;
}
scope.options = options;
scope.ctrl = ctrl;
ctrl.init(scope, element, options);
}
It seems the controller passed in is not yet fully initialised when the link is called.