Hi,
I have defined a common directive (uiAlerts) + service (uiAlertsService) for showing app-level alerts on the screen. It's part of my 'common' module that has a whole toolbox of such common directives, services, & filters that are used all over my app.
In one of my Angular apps, I need to give a drastically different visual treatment to on-screen alerts. Therefore, I need to re-define/override the uiAlerts directive. However, whenever I try to do the following, Angular ends up applying TWO directives to the same DOM element (one from the common module and the other from myModule).
var mod = angular.module('myModule', ['common']);
mod.directive('uiAlerts', ['uiAlertsService', function(alerts) {
// Custom directive code here....
}]);
What is the correct way to achieve this?
Saurabh.