title: Function not updating variable in controller
body: <p>I am unable to solve this problem.</p>
  
  <p>This is my main page controller:</p>
  
  <pre><code>'use strict';
  angular.module('myContacts', [
      'ngRoute',
      'firebase',
      'contacts.mycontacts'
  ])
  
  .config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
      $locationProvider.hashPrefix('!');
      $routeProvider.otherwise({redirectTo: '/contacts'});
  }]);
  </code></pre>
  
  <p>This is my second or contacts controller:</p>
  
  <pre><code>angular.module('contacts.mycontacts', ['ngRoute'])
  
  .config(['$routeProvider', function($routeProvider) {
      $routeProvider.when('/contacts', {
          templateUrl: 'contacts/contacts.html',
          controller: 'contactsCtrl'
      });
  }])
  
  .controller('contactsCtrl', ['$scope',function($scope) {
      $scope.showAddForm = function(){
          console.log($scope.addFormShow); // gives me undefined every time
          $scope.addFormShow = true;
          console.log($scope.addFormShow); // gives me true
      }
      console.log($scope.addFormShow); //gives me undefined 
  }]); 
  </code></pre>
  
  <p>and this is my HTML of contacts:</p>
  
  <pre><code>&lt;div class="row" ng-controller='contactsCtrl'&gt;
  &lt;div ng-show="addFormShow"&gt; the Add Button get a  click from user &lt;/div&gt;
  &lt;div class="small-12 large-2 columns"&gt;
      &lt;a class="button large" href="#" ng-click="showAddForm()"&gt;+  &lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As u can see in the modulel->contacts.mycontacts->controller , this is the problem function </p>
  
  <pre><code>$scope.showAddForm = function(){ console.log($scope.addFormShow); // gives me undefined every time
  $scope.addFormShow = true;
  console.log($scope.addFormShow); // gives me true 
  }   
  console.log($scope.addFormShow); //gives me undefined
  </code></pre>
  
  <p>HTML from contacts under ng-view where the problem is occurring // the above function is not updating addFormShow in below HTML </p>
  
  <pre><code>&lt;div class="row" ng-controller='contactsCtrl'&gt;
  &lt;div ng-show="addFormShow"&gt; the Add Button get a  click from user &lt;/div&gt;
  &lt;div class="small-12 large-2 columns"&gt;
      &lt;a class="button large" href="#" ng-click="showAddForm()"&gt;+  &lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>