Jump to content

[Resolvido] Publish Web

Recommended Posts



Eu fiz um site com ASP.NET e com angular.js e no meu pc funciona bem.

Quando passo para o servidor deixa de funcionar.

Eu penso que o problema está algures nas rotas do angular.

angular.min.js:103GET http://XPTO/App/Auth/Views/Login.html 404 (Not Found)(anonymous function) @ angular.min.js:103n @ angular.min.js:98g @ angular.min.js:95(anonymous function) @ angular.min.js:130$eval @ angular.min.js:145$digest @ angular.min.js:142$apply @ angular.min.js:145(anonymous function) @ angular.min.js:20invoke @ angular.min.js:41c @ angular.min.js:20Bc @ angular.min.js:21ge @ angular.min.js:19(anonymous function) @ angular.min.js:315fire @ jquery-1.10.2.js:3062fireWith @ jquery-1.10.2.js:3174ready @ jquery-1.10.2.js:447completed @ jquery-1.10.2.js:118

angular.min.js:117Error: [$compile:tpload] http://errors.angularjs.org/1.5.7/$compile/tpload?p0=%2FApp%2FAuth%2FViews%2FLogin.html&p1=404&p2=Not%20Found

at Error (native)

at http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:6:412

at http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:156:281

at http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:130:409

at m.$eval (http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:145:107)

at m.$digest (http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:142:173)

at m.$apply (http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:145:401)

at l (http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:97:250)

at K (http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:101:373)

at XMLHttpRequest.y.onload (http://XPTO/BackofficeOrders/Scripts/angular/angular.min.js:102:397)

O link da view Login devia ser XPTO/Backoffice/App/Auth/Views/Login.html.

"use strict";
var authApp = angular.module("AuthApp", ["ngRoute", "ngStorage"]);
authApp.config(["$routeProvider", "$locationProvider",
 function ($routeProvider, $locationProvider) {
			templateUrl: "/App/Auth/Views/Login.html"
			, controller: "AuthController"

  // use the HTML5 History API

Share this post

Link to post
Share on other sites

O angular faz um pedido a http://XPTO/App/Auth/Views/Login.html ?

Esse pedido é devido a rota.

Se colocares esse endereço diretamente no browser o que acontece?

Este url http://XPTO/App/Auth/Views/Login.html não existe.

No inicio ao carregar a página, o endereço é http://XPTO/BackofficeOrders mas depois automaticamente passa para http://XPTO/Login.

Edited by AJBM

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.