title: How to hide templates with AngularJS ngView for unauthorized users?
body: <p>I have a basic PHP app, where the user login is stored in the HTTP Session. The app has one main template, say index.html, that switch sub-view using ngView, like this</p>
  
  <pre><code>&lt;body ng-controller='MainCtrl'&gt;
      &lt;div ng-view&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Now, this main template can be protected via basic PHP controls, but i have sub-templates (i.e. user list, add user, edit user, etc.) that are plain html files, included from angular according to my route settings. </p>
  
  <p>While i am able to check for auth what concern the request of http services, one user is able to navigate to the sub-template url and access it. How can i prevent this from happen?</p>