angularjs - Bypassing Angular Routing on <a> tags -


after searching long , far, have not been able determine how hit external routes outside of angular app using tags. need links go other places server serves up. example,

<a href="/login", target="_self">login</a> 

does not render non-angular page want server. takes me same place. however, of note url hit, angular re-renders page. "_self" target trick has worked in past, i'm not sure why it's not working now.

does have advice here?

html markup:

<div data-ng-app="myapp">     <div ng-view>       //angular templates, angular stuff, etc... // works fine     </div>      <a href="/login", target="_self">login</a> // doesn't render page </div> 

angular code:

app.config(['$routeprovider', '$locationprovider', function($routeprovider, $locationprovider) {   $routeprovider.       when('/', {templateurl: 'templates/dashboard.html',   controller: 'dashboardcontroller'}).       when('/learn', {templateurl: 'templates/learn.html',   controller: 'learncontroller'}).       when('/draft', {templateurl: 'templates/draft.html',   controller: 'draftcontroller'}).        otherwise({redirectto: '/'});        $locationprovider.html5mode(true);  }]); 

if external routes not require angularjs magic, put links outside of of div you're using declare angularjs app.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -