title: Angular 2nd directive not working
body: <p>I have 2 directives in one page. The first one works fine, but the second one not working.</p>
  
  <p>This is my Code:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;body class="login" ng-app="Login"&gt;
  &lt;div ng-controller="HttpLoginController"&gt;
  &lt;wrongdetails&gt;&lt;/wrongdetails&gt;
  &lt;loading&gt;&lt;/loading&gt;
  &lt;input type="submit" ng-click="LoginUser()" value="Login" /&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>var app = angular.module("Login", [])
  app.controller("HttpLoginController", function($scope,$http){
  $scope.LoginUser = function(){
  $scope.loading = true;
  var data = [];
  var config = {}
  $http.post('Mylink', data, config)
  .success(function (data, status, headers, config) { $scope.loading = false;})
  .error(function (data, status, header, config) {$scope.wrongdetails = true; });
  };      
  });
  //Directives
  app.directive('loading', function () {
      return {
          restrict: 'E',
          //replace:true,
          template: '&lt;div id="loading"&gt; &lt;div class="progress-line"&gt;&lt;/div&gt;&lt;br/&gt; &lt;/div&gt;',
          link: function (scope, element, attr) {
                scope.$watch('loading', function (val) {
                    if (val)
                        $(element).show();
                    else
                        $(element).hide();
                });
          }
      }
  })
  app.directive('wrongdetails', function () {
      return {
          restrict: 'E',
          replace:true,
          template: '&lt;div class="alert alert-danger display-hide"&gt;&lt;button class="close" data-close="alert"&gt;&lt;/button&gt;&lt;span&gt; Error. &lt;/span&gt;&lt;/div&gt;',
          link: function (scope, element, attr) {
                scope.$watch('wrongdetails', function (val) {
                    if (val)
                        $(element).show();
                    else
                        $(element).hide();
                });
          }
      }
  })
  </code></pre>
  
  <p>But The second Directive never show.
  What I am doing wrong?</p>
  
  <p>Sorry for my mistake. I forget to copy paste the directives.
  I think now is ok</p>