[英]ng-href not responding other than updating link or addressbar when i clieck on it (Angular Js)
I've ng-href which replace values in href that will be ok but when i click on the link, It change url on address bar which is working correct to but doesn't process to execute that URL. 我已经用ng-href替换了href中的值,这是可以的,但是当我单击链接时,它更改了地址栏上的url,该地址栏正确无误,但不执行该URL。
What's blocking url to process? 什么阻止了URL处理? I've taken off ng-click method off from the link as well.
我也从链接中删除了ng-click方法。
<li id="tst_productList_categoryLeftNav_categoryFacet_{{categoryFacet.categoryId}}" ng-repeat="categoryFacet in vm.products.categoryFacets | orderBy : 'shortDescription'"
ng-class="{'f-selected' : categoryFacet.selected}">
<a href="javascript:;" ng-href="/search?categoryId={{categoryFacet.categoryId}}&filters={{vm.filters}}&sortby={{vm.sortBy}}&page={{vm.page}}&pageSize={{vm.pageSize}}&criteria={{vm.criteria}}&view={{vm.view}}&columns={{vm.columns}}">
<span class="f-name">{{categoryFacet.shortDescription}}</span>
<span class="f-count">({{categoryFacet.count}})</span>
</a>
</li>
what's blocking link? 什么阻止了链接?
ng-href
directive internally creates href
attribute. ng-href
指令在内部创建href
属性。 Try removing the href
attribute that you have added manually. 尝试删除您手动添加的
href
属性。
尝试将target="_self"
到<a>
元素
<a target="_self" ng-href="/search?categoryId={{categoryFacet.categoryId}}&filters={{vm.filters}}&sortby={{vm.sortBy}}&page={{vm.page}}&pageSize={{vm.pageSize}}&criteria={{vm.criteria}}&view={{vm.view}}&columns={{vm.columns}}">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.