title: Angularjs ng-show issue with ng-route
body: <p>I'm newbie to angular world. I'm trying to create a login page.When the user login, i want to show some contents in the navbar.</p>
  
  <p>Currently i'm using ng-show and ng-route. When i'm not using ng-route, ng-show works fine but when i use ng-route, ng-show is not working .I don't want to use angular-ui-router. What i'm doing wrong. Can anyone help me</p>
  
  <p><strong>Angular Config</strong></p>
  
  <pre><code>app.config(['$routeProvider', function($routeProvider) {
              $routeProvider
              .when('/', {
                 templateUrl: 'login.html',
                 controller: 'ctrl'
              })
              .when('/logged', {
                 templateUrl: 'logged.html',
                 controller: 'ctrl'  
              })
              otherwise({
                 redirectTo: '/'
              });
           }]);
  app.controller("ctrl",['$scope','$http','$location',function($scope,$http,$location){
              $scope.myvalue2=false;
           $scope.login = function()
           {
            //here i making the $http.post to login on success im changing $scope.myvalue2=true;
           }
           }]);
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;nav class="navbar-default navbar-dark bg-primary"&gt;
     &lt;div class="navbar"&gt;
     &lt;div class="container-fluid navi"&gt;
       &lt;div class="navbar-header" style="padding-bottom:10px"&gt;
                             &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"&gt;
                               &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                               &lt;span class="icon-bar"&gt;&lt;/span&gt;
                               &lt;span class="icon-bar"&gt;&lt;/span&gt;
                               &lt;span class="icon-bar"&gt;&lt;/span&gt;
                             &lt;/button&gt;
                      &lt;ul class="navbar-brand " style="list-style:none;padding-top:10px;"&gt;&lt;li&gt;name&lt;/li&gt;&lt;/ul&gt;
          &lt;/div&gt;
      &lt;div ng-show="myvalue2" class="ng-cloak"&gt;
      &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1" style="padding-top:10px"&gt;
         &lt;ul class="nav navbar-nav"&gt;
              &lt;li&gt;&lt;a href="pages/enhance.jsp#section0" style="font-size:14px;"&gt;About&lt;/a&gt;&lt;/li&gt;
             &lt;li class="dropdown"&gt;&lt;a class="dropdown-toggle" data-toggle="dropdown" href="#" style="font-size:14px;"&gt;Settings&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>