I've placed a below link in my code角JS <a href> route back to LogIn
<a href="/#/list/' + data._id + '" class="btn btnprimary1" > LIST </a>
It should routed to below point
.state('index.list', {
url: '/list/:id',
templateUrl: '/list.html',
data: { pageTitle: 'listing', pageFilter: 'off' },
controller: 'listController',
});
Instead of that it routed to the main page /# and from that it checks login and rerouted to my current page
Is it a correct way to place href in angular code to route to a state with specific Id.
喔人...感谢 –
它的工作,但你能提供给我更好地理解为什么发生.. –
@AbhishekParikh你的href属性的值是没有棱角的表达式,将解析和编译。它缺少double {{..}}(它甚至不是一个有效的js表达式,请看引号!)。 ng-href和ui-sref是不同的,因为这些都是指令。 – hansmaad