title: How to check same Save directive has loaded multiple times in Angular js application
body: <p>Problem :</p>
  
  <p>I have directive dedicated to show all error messages(404, etc..)</p>
  
  <p>But some time in page , multiple times 404 error occurs several time</p>
  
  <p>I need to get rid of same msg directive from the page.and keep only unique error msges</p>
  
  <p>My approach would be</p>
  
  <p>1 -  load the directive several time using someService
   2 -  check from inside of directive that same error message block 
         directive is already present ? "
   3 - if there , then remove the similar type error message directive.</p>
  
  <p>Question 1 - Is this possible to check the same directive loaded twice in the page ?
  Question 2 - If so how to access /how to check?</p>
  
  <p>P.S : currently below code doing nothing.</p>
  
  <pre><code>angular.modue('myApp').directive('ErrorBlock',['someInjection',functon(someInjection){
  return{
    restrict : E,
    replace :true,
    scope : false,
    link : function(scope , attr, element){
      scope.errorArray = someInjection;
    },
    template : "&lt;div ng-repeat='i in errorArray' ng-bind='i'&gt;&lt;/div&gt;"    
  };}]);
  </code></pre>