Jelastic servers AngularJS ngRoute not working - angularjs

I have created an application using AngularJS and ngRoute for partial templates, this works fine on local Tomcat server. But when I deploy the same application on Jelastic server following error is shown:
Error: [$compile:tpload] Failed to load template: volvo.html (HTTP status: 404 Not Found) http://errors.angularjs.org/1.6.1/$compile/tpload?p0=volvo.html&p1=404&p2=Not%20Found
Tried through <a href="volvo"> and $location.path("/volvo") but didnt work.

Resolved issue by adding in main html/jsp file.

Related

Springboot web application: Failed to load resource: the server responded with a status of 404 ()

I have a springboot application which includes Post and get Rest API. I have included index.html in path src/main/resources/templates/index.html. Inside index.html i m calling the javascript. But the browser errors out saying Failed to load resource: the server responded with a status controller.js of 404 ().
Due to this its not able to find the js file and perform required operation when i click on the button. Please let me know what changes has to be made.
code snippet:
I have js file inside static/js folder. I tried changing the file path location but not helping.

HTTP Error 404.0 - Not Found AngularJS with IIS

I have used gulp to build my client angularJS application. After i deployed into IIS i'm getting an issue. My page is working fine when navigate through menu's. But when i refresh by page (or) copy and paste the URL its giving me 404 error.
HTTP Error 404.0 - Not Found
can anyone help me, to resolved this?
Use the otherwise method, which is the default route when none of the others get a match
Did you configured otherwise option in your route config section?
like this below?
app.config(function($routeProvider) {
$routeProvider.otherwise({
templateUrl : "main.htm",
controller : "mainController"
});
});
You can test it under this link
https://www.w3schools.com/angular/tryit.asp?filename=try_ng_routing_otherwise
I hope you can solve your issue by this below discussion
Refreshing page gives "Page not found"

angular2-sails 404 error (not found)

I am having difficulty hooking up my sql server with a front end of angular 2.
I ran the sailsjs getting started guide
I then hooked up angular2 with sails. I followed the sharpten guide
http://sharpten.com/blog/2016/02/02/integrating-angular-2-with-sails-js.html
I then used the sails-sqlserver package to connect to my localhost sql server
sails-sqlserver
I have the sails returning my data and now i want to use angular 2 to interact with the data.
I found the angular2-sails package.
https://www.npmjs.com/package/angular2-sails
However, I am getting a 404 error with the angular2-sails package
ERROR:
zone.js:1382
"GET http: //localhost:1337/node_modules/angular2-sails/ 404 (Not Found)"
How do i get rid of this 404 error?
Thanks.
I got this to work with version 0.1.4 of angular2-sails.
i commented out the sailsmodule due to version 0.1.4 just having the SailsService
//import {SailsModule} from "angular2-sails";
In my component I imported the SailsService
import {SailsService} from "angular2-sails/dist/index";

Error while running angular js html page on a server

When I'm running my HTML page through a server I'm always getting an error with my angular JavaScript file included. But it runs fine without local server in Mozilla Firefox and Safari but not with Google Chrome (XML errors with Google Chrome).
//localhost:8000/Users/harsha/Documents/angular%20js/nganimate.js
Failed to load resource: the server responded with a status of 404 (File not found)
Failed to load resource: the server responded with a status of 404 (File not found)
angular.js:4361Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.0/$injector/modulerr?p0=controllerapp&p1=Er…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.0%2Fangular.min.js%3A19%3A264)
The Screenshot of error message in console
You have error in js file path .
//localhost:8000/Users/harsha/Documents/angular%20js/nganimate.js
So index file is unable to locate the file.
Users/harsha/Documents/angular%20js/nganimate.js
The path of your server isn't the one from your C: it's relative from where your start your server. If you need us to figure out from where your server start, you need to tell us what is the server.
And if it's the grunt web server, show us your build file.

404 when trying to load other template files when deploying angular app

I have uploaded my angular app to my website.
When I try to acces it I get a 404 not found error on every possible file that the app is using. But the files are there so it should load it.
This is my project structure:
The error:
GET ****/views/templates/home.html 404 not found
Everything is working fine when I run it locally.

Resources