title: AngularJS : How do I switch views from a controller function?
body: <p>I am trying to use the <em>ng-click</em> feature of AngularJS to switch views. How would I go about doing this with the code below?</p>
  
  <p>index.html</p>
  
  <pre><code> &lt;div ng-controller="Cntrl"&gt;
          &lt;div ng-click="someFunction()"&gt;
              click me
          &lt;div&gt;
      &lt;div&gt;
  </code></pre>
  
  <p>controller.js</p>
  
  <pre><code>  function Cntrl ($scope) {
          $scope.someFunction = function(){
              //code to change view?
          }
      }
  </code></pre>