title: Failed to load resource: the server responded with a status of 404 (Not Found) angular js + ionic
body: <p><img src="https://i.stack.imgur.com/rGa81.jpg" alt="enter image description here"></p>
  
  <p>This is the error im having from Google Devt Tools. Anyone knows the problem? I tried to change in many times including the file structure and the stateProvider (no controllers for that) in app.js file but it does not seem to be the issue. (script is included in app.js with correct file name and directory)</p>
  
  <p>In addition, my logout and submitPost buttons arent working as well. </p>
  
  <p><br>
  <strong>newpost.html</strong> </p>
  
  <pre><code>&lt;div class="modal slide-in-up" ng-controller="NavCtrl"&gt;
   &lt;!-- Modal header bar --&gt;
     &lt;header class="bar bar-header bar-secondary"&gt;
        &lt;button class="button button-clear button-primary" ng-click="close()"&gt;Cancel&lt;/button&gt;
        &lt;h1 class="title"&gt;New Shout&lt;/h1&gt;
        &lt;button class="button button-positive" ng-click="submitPost()"&gt;Done&lt;/button&gt;
     &lt;/header&gt;
  
  &lt;!-- Modal content area --&gt; 
     &lt;ion-content class="padding has-header"&gt;
         &lt;form class ng-submit="submitPost()" ng-show="signedIn()"&gt; 
              &lt;div class="form-group"&gt;
                  &lt;input type="text" class="form-control" placeholder="Title" ng-model="post.title"&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;input type="text" class="form-control" placeholder="Link" ng-model="post.url"&gt;
              &lt;/div&gt;
              &lt;button type="submit" class="btn btn-default"&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
      &lt;/ion-content&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><br>
  <strong>controller.js file</strong> </p>
  
  <pre><code>app.controller('NavCtrl', function ($scope, $firebase, $location, Post, Auth, $ionicModal) {
      $scope.post = {url: 'http://', title: ''};
  
      // Create and load the Modal
      $ionicModal.fromTemplateUrl('newpost.html', function(modal) {
        $scope.taskModal = modal;
      }, {
        scope: $scope,
        animation: 'slide-in-up'
      });
      // Open our new task modal
      $scope.submitPost = function () {
        Post.create($scope.post).then(function (postId) {   
          $scope.post = {url: 'http://', title: ''};  
          $location.path('/posts/' + postId);              
          $scope.taskModal.show();  
        });
      };
      $scope.close = function() {
        $scope.taskModal.hide();
      };
      $scope.logout = function () {
          Auth.logout();
      };
  });
  </code></pre>
  
  <p><br>
  <strong>List of items page, post.html</strong> </p>
  
  <pre><code>&lt;ion-header-bar class="bar-positive" ng-controller="NavCtrl"&gt;
     &lt;button class="button button-clear" ng-click="submitPost()"&gt;New&lt;/button&gt;
     &lt;h1 class="title"&gt;&lt;b&gt;&lt;a class="navbar-brand" href="#/posts"&gt;MyApp&lt;/a&gt;&lt;/b&gt;&lt;/h1&gt;
     &lt;button class="button button-clear" ng-click="logout()"&gt;Logout&lt;/button&gt;
  &lt;/ion-header-bar&gt;
  </code></pre>