I’m developing a web app with this framework…you can be seen in local but, after uploaded on the server it won’t be seen !!! WHY ???
I’m getting a lot of errors in my console…
Failed to load resource: the server responded with a status of 404 (Not Found) http://antoniojunior.altervista.org/2014/a/js/angular/ionic-angular.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://antoniojunior.altervista.org/2014/a/js/angular/angular.resource.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://antoniojunior.altervista.org/2014/a/js/angular/angular.sanitize.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://antoniojunior.altervista.org/2014/a/js/angular/angular.animate.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://antoniojunior.altervista.org/2014/a/js/angular/angular-ui-router.js
WARNING: Tried to load angular more than once.
Uncaught SyntaxError: Unexpected end of input menu.js:1
Uncaught SyntaxError: Unexpected end of input antoniojunior.altervista.org/:1
Uncaught object ionic.bundle.js:9069
Thankyou, I have corrected a lot of errors…and now???..I do not know the js…
Well you’re trying to load angular more than once.
<script src="js/ionic.js"></script>
<script src="js/ionic.bundle.js"></script>
<script src="js/ionic-angular.js"></script>
<script src="js/angular/angular.js"></script>
<script src="js/angular/angular-resource.js"></script>
<script src="js/angular/angular-sanitize.js"></script>
<script src="js/angular/angular-animate.js"></script>
<script src="js/angular-ui/angular-ui-router.js"></script>
You should change it to this.
<script src="js/ionic.bundle.js"></script>
Excuse me, I do not understand…If I change all in
<script src="js/ionic.bundle.js"></script>
It does not change anything…
Remove all the other scripts, ionic.bundle is all of those scripts in one file.
In fact, I have changed all in
Ionic.bundle.js.
The same, I do not see anything…
You also have a syntax issue in your js
Uncaught SyntaxError: Unexpected end of input menu.js:1
I know, I saw.
but I do not know where to change, I do not understand the js
You had comments that were commenting out your entire script. Try pasting this.
angular.module('ionicApp', ['ionic']).config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('eventmenu', {
url: "/event",
abstract: true,
templateUrl: "event-menu.html"
})
//i menu
.state('eventmenu.home', {
url: "/home",
views: {
'menuContent': {
templateUrl: "home.html"
}
}
})
.state('eventmenu.antonio', {
url: "/antonio",
views: {
'menuContent': {
templateUrl: "antonio.html",
controller: "AntonioCtrl"
}
}
})
$urlRouterProvider.otherwise("/event/home");
})
.controller('MainCtrl', function ($scope, $ionicSideMenuDelegate) {
$scope.attendees = [{
firstname: 'Nicolas',
lastname: 'Cage'
}, {
firstname: 'Jean-Claude',
lastname: 'Van Damme'
}, {
firstname: 'Keanu',
lastname: 'Reeves'
}, {
firstname: 'Steven',
lastname: 'Seagal'
}];
$scope.toggleLeft = function () {
$ionicSideMenuDelegate.toggleLeft();
};
}).controller('CheckinCtrl', function ($scope) {
$scope.showForm = true;
$scope.shirtSizes = [{
text: 'Large',
value: 'L'
}, {
text: 'Medium',
value: 'M'
}, {
text: 'Small',
value: 'S'
}];
$scope.attendee = {};
$scope.submit = function () {
if (!$scope.attendee.firstname) {
alert('Info required');
return;
}
$scope.showForm = false;
$scope.attendees.push($scope.attendee);
};
}).controller('AttendeesCtrl', function ($scope) {
$scope.activity = [];
$scope.arrivedChange = function (attendee) {
var msg = attendee.firstname + ' ' + attendee.lastname;
msg += (!attendee.arrived ? ' has arrived, ' : ' just left, ');
msg += new Date().getMilliseconds();
$scope.activity.push(msg);
if ($scope.activity.length > 3) {
$scope.activity.splice(0, 1);
}
};
})
Doesn’t work…
Uncaught SyntaxError: Unexpected end of input antoniojunior.altervista.org/2014/a/js/menu.js:1
Uncaught object antoniojunior.altervista.org/2014/a/js/ionic.bundle.js:12830
Missed a comment, try this.
angular.module('ionicApp', ['ionic'])
.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('eventmenu', {
url: "/event",
abstract: true,
templateUrl: "event-menu.html"
})
.state('eventmenu.home', {
url: "/home",
views: {
'menuContent': {
templateUrl: "home.html"
}
}
})
.state('eventmenu.antonio', {
url: "/antonio",
views: {
'menuContent': {
templateUrl: "antonio.html",
controller: "AntonioCtrl"
}
}
});
$urlRouterProvider.otherwise("/event/home");
})
.controller('MainCtrl', function ($scope, $ionicSideMenuDelegate) {
$scope.attendees = [{
firstname: 'Nicolas',
lastname: 'Cage'
}, {
firstname: 'Jean-Claude',
lastname: 'Van Damme'
}, {
firstname: 'Keanu',
lastname: 'Reeves'
}, {
firstname: 'Steven',
lastname: 'Seagal'
}];
$scope.toggleLeft = function () {
$ionicSideMenuDelegate.toggleLeft();
};
}).controller('CheckinCtrl', function ($scope) {
$scope.showForm = true;
$scope.shirtSizes = [{
text: 'Large',
value: 'L'
}, {
text: 'Medium',
value: 'M'
}, {
text: 'Small',
value: 'S'
}];
$scope.attendee = {};
$scope.submit = function () {
if (!$scope.attendee.firstname) {
alert('Info required');
return;
}
$scope.showForm = false;
$scope.attendees.push($scope.attendee);
};
}).controller('AttendeesCtrl', function ($scope) {
$scope.activity = [];
$scope.arrivedChange = function (attendee) {
var msg = attendee.firstname + ' ' + attendee.lastname;
msg += (!attendee.arrived ? ' has arrived, ' : ' just left, ');
msg += new Date().getMilliseconds();
$scope.activity.push(msg);
if ($scope.activity.length > 3) {
$scope.activity.splice(0, 1);
}
};
});
1 Like