I have following code:
var app = angular.module("appSystem", ['ngRoute']);
app.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when("/teste", {templateUrl: './view/teste.html', controller: 'testeController'})
.when("/about", {templateUrl: './view/sobre.html', controller: 'sobreController'})
.otherwise({redirectTo: "/app"});
$locationProvider.html5Mode(true);
});
Let's imagine the following situation
The site has static pages and has links in its navigation bar for them, suppose we have Home , Login and of these static pages we have one called Application , where it is a SPA that I use Angular .
- These two pages that are in the app configuration are my hypothetical views .
- The base url for SPA set in html is
<base href="/aplicacao" />
The rest is all running and is not the case here.
How do I get out of the SPA?
That is, since I had my navigation bar that made requests to the server to change pages, with this configuration of routes everything changes. How do I set within the Angular that the routes established for the links in the navigation bar (and also in some footer) are met outside the SPA?