I have some two ui-router states
in my angular application, which works fine, like this:
app.config(["$stateProvider",
function($stateProvider){
$stateProvider
.state("settings", {
url: "/settings",
views: {
"secondMenu": {
templateUrl: "second_menu.html?parent=settings",
controller: "settingsController"
},
"thirdMenu": {
template: empty_template
}
}
})
.state("cabinet", {
url: "/cabinet",
views: {
"secondMenu": {
templateUrl: "second_menu.html?parent=cabinet",
controller: "cabinetController"
},
"thirdMenu": {
template: empty_template
}
}
})
But only part of my menu i need work with angular. Other part of menu must go to static (not angular) url of my site, like this:
<ul>
<li><a href="/static-url/">static-url</a></li>
<li><a ui-sref="cabinet">cabinet angular url</a></li>
<li><a ui-sref="settings">settings angular</a></li>
</ul>
And when i click on angular-urls - i get need information in my ng-view
, but if after then i click on static-url
- my url changing from /#/cabinet
(for ex.) to /static-url/
, but query to server does not exist. Page content saving as in cabinet angular url.
How I can disabling angular ui-router working on /static-url/
?
So for future lurkers, here's what you need to do. Just add this attribute to your static page's anchor tag:
Like this: