0
My application is simple, I did with Angularjs, just to study, works quietly locally but when I go up to my server from Locaweb, the files keep returning 404, have some configuration that I need to do?
And my application I left well configured.
Index.html:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Busca CEP</title>
<base href="/">
<meta charset="utf-8" />
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1' />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1" />
<link href='/favicon.ico' rel='shortcut icon' type='image/x-icon' />
<!--[if lt IE 8]>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/dist/style.min.css" />
</head>
<body ng-app="app">
<div ui-view=""></div>
<toaster-container></toaster-container>
<script src="/dist/vendors.min.js"></script>
<script src="/app/app.min.js"></script>
</body>
</html>
route js:
app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
function ($stateProvider, $urlRouterProvider, $locationProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
// $locationProvider.html5Mode(false).hashPrefix('');
$urlRouterProvider.otherwise('/');
$stateProvider
.state({
name: 'home',
url: '/',
controller: 'homeController',
templateUrl: '/views/home.html'
});
}
]);
My structure is basically like this:
- app
- Assets
- dist
- vendors
- views
- index.html
Yeah, but he can’t get the folder, he can’t find the right address
– Guilherme Almeida
William I believe is missing a point " . " in the path of your files. try to put the link of href starting with a . and see if it works that way: "./dist/style.min.css" (and checks whether "style.min.css" is at the root of the "dist" folder" !)
– hugocsl