I have a directive
.directive('loginWindow',['$modal','$alert',function($modal,$alert){
return{
restrict: 'A',
link: function(scope, elem, attrs) {
var modal = $modal({ template:
'../views/login/login.html',show:false});
var alert = undefined;
scope.$on('auth-invalid-user',
function(event,invalidStatus) {
modal.show();
alert = $alert({content: invalidStatus, type:
'danger', show: true,container:'#invalid-credential'});
});
}
}
}]);
What is the correct way to ensure that modal.show() is been called. I tried
with "Spies" but didn't worked, Maybe I am doing it in the wrong way.
Please provide your help to get the knowledge about it.
Thank you.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.