R
R
Roman2016-03-30 22:00:17
Angular
Roman, 2016-03-30 22:00:17

Why don't links work as I expected when using Angular?

<div class="row message-wrapper">
  <div class="col s12 l10">
    <a ng-href="" ng-bind="msg.User.Name"></a>
       </div>
</div>

when you click on the link, only the url in the browser changes, the transition to the address does not occur, why? how to make it switch?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Kondratiev, 2016-03-30
@losaped

This framework is designed to create SPA applications, by default it resets default behaviors for links, unfortunately I am not very familiar with this framework.
Alternatively, you can do this:
and in the controller

$scope.myCustomRedirect = function(url){
    location.href = url;
}

S
Sergey, 2016-03-30
Protko @Fesor

when you click on a link, only the url changes in the browser

perhaps because you are using some kind of ngRoute or uiRouter?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question