Ok, I made a new AngularJS 1.6.10 app using Yeoman, copied over the old
code and now this directive.js file
angular.module("iShareApp",[])
.directive("waiting",["$rootScope",
function($rootScope){
return {
restrict: "AE",
link: function(scope,element,attrs){
element.addClass("hide");
$rootScope.$on("$routeChangeStart",function(){
element.removeClass("hide");
});
$rootScope.$on("$routeChangeSuccess",function(){
element.addClass("hide");
});
}
};
}
])
.directive("focus",["$rootScope",
function($rootScope){
return {
restrict: "AE",
link: function (scope, element, attrs){
alert("isaFocus is working!!!");
}
};
}
]);
lets me use the waiting directive as <waiting>Just a moment...</waiting>
and <div waiting>Just a moment...</div>. TExt gets hidden and displays only
during routeChange.
Thanks all for the response!
Marc
--
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/groups/opt_out.