freylis freylis - 2 months ago 16
AngularJS Question

Disable ui-router to some url

I have some urls, like

/some_url_1/
,
/some_url_2/
and
/static_url/
.

In my app-config i defined ui-router states for urls
/some_url_1/
and
/some_url_2/
, but url
/static_url/
must doing full reaload page as if i dont using angular.

Now, when on page
/some_url_1/
i click to
a[href="/static_url/"]
ui-router try to find state for this url, but cant find and page content stay as at
/some_url_1/
.

How i can disable
/static_url/
for ui-router and make full reload page to

Answer

You can use this (It's not tested):

<a href="/url/whatever" ng-click="$event.stopPropagation()">Outside link</a>
Comments