I have an angularJS application (AngularJS v1.3.0-beta.3) that crashes in IE10 compatibility mode. It works great in FF, Chrome, and IE11. Here is what I get as an error in the console:
Multiple directives [login, login] asking for 'login' controller on: <div>
to set the state of the application, I create a node:
link: function ($scope, $element, $attrs) { .... $element.html('<login></login>'); $compile($element.contents())($scope);
Here is my directive to enter:
widgets.directive('login', ['$compile', '$http', 'resourceLoader', function ($compile, $http, resourceLoader) { return { restrict: 'AE', replace: true, template: '<div></div>', controller: function ($scope, $element) { $scope.user.isLogged = false; $scope.user.password = undefined; $scope.submitLogin = function () { // code that goes to server }; }, link: function ($scope, $element, $attrs) { resourceLoader.get('templates', 'profile', 'unlogged/login', 'jquery.min', function (template) { $element.html(template); $compile($element.contents())($scope); }); } }; }]);
Any ideas? Thanx.