Failed to load the resource: the server responded with a status of 404 (not found) angular js + ionic

enter image description here

This is a bug that came from Google Devt Tools. Does anyone know a problem? I tried to change many times, including the file structure and stateProvider (there are no controllers for this) in the app.js file, but this does not seem to be a problem. (the script is included in app.js with the correct name and file directory)

In addition, my exit and submitPost buttons also work.


newpost.html

<div class="modal slide-in-up" ng-controller="NavCtrl">
 <!-- Modal header bar -->
   <header class="bar bar-header bar-secondary">
      <button class="button button-clear button-primary" ng-click="close()">Cancel</button>
      <h1 class="title">New Shout</h1>
      <button class="button button-positive" ng-click="submitPost()">Done</button>
   </header>

<!-- Modal content area --> 
   <ion-content class="padding has-header">
       <form class ng-submit="submitPost()" ng-show="signedIn()"> 
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Title" ng-model="post.title">
            </div>
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Link" ng-model="post.url">
            </div>
            <button type="submit" class="btn btn-default">Submit</button>
        </form>
    </ion-content>
</div>


controller.js file

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();
    };
});


List of items, post.html

<ion-header-bar class="bar-positive" ng-controller="NavCtrl">
   <button class="button button-clear" ng-click="submitPost()">New</button>
   <h1 class="title"><b><a class="navbar-brand" href="#/posts">MyApp</a></b></h1>
   <button class="button button-clear" ng-click="logout()">Logout</button>
</ion-header-bar>
+4
source share
2 answers

404 , . , . URL- ( ). , https://istead http://? , " www" URL-?

URL-, Chrome, , .

+5

, - , firebase . , 503, 400 75%

, ,

 //Event: data.Event,
       // Date: data.Date,
      // Time: data.Time
var data = getData();
data.filename=uploadfile.name;
var metadata = {
    customMetadata: {
       data
    }
}

var storageRef = firebase.storage().ref().child("features");

console.log("Filenames to upload :" + uploadfile.name);

var fileRef = storageRef.child(uploadfile.name);

var uploadTask = fileRef.put(uploadfile,metadata);

, ,

  var metadata = {
    customMetadata: {
        Event: data.Event,
        Date: data.Date,
        Time: data.Time
    }
}

. , , firebase .

0

All Articles