Angular.dart禁用路由? [英] Angular.dart Disable Routing?

查看:178
本文介绍了Angular.dart禁用路由?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在我的页面的一部分使用Angular.dart ...其余包含另一个DART应用程序(编译到JS ...一切都在JS从Dart)和一些其他HTML等。基本上我的Angular .dart应用程序只是页面中的一个组件。

I'm only using Angular.dart on part of my page...The rest contains another Dart app (compiled down to JS...everything is in JS from Dart) and some other HTML, etc. Essentially my Angular.dart app is just a component within the page.

但是,现在页面上的所有链接似乎都想通过Angular.dart路由。我甚至不需要路由(虽然有一些定义)技术上。

However, now all links on the page seem to want to go through Angular.dart routing. I don't even need routing (though have a few defined) technically.

有没有办法完全禁用路由?这样,当点击< a href =/ page2>另一个网页< / a> 实际上能正常工作,更改地址栏中的网址现在它只是去#和我所有的链接被禁用。我甚至不使用ng-click或任何类似的东西。

Is there a way to disable the routing altogether? So that when clicking on <a href="/page2">Another page</a> actually works like normal, changing the URL in the address bar? Right now it's just going to # and all my links are disabled. I wasn't even using ng-click or anything like that either.

如何让Angular.dart只保留这些链接?

How can I make Angular.dart just leave those links alone? Thanks.

推荐答案

由于 route_hierarchical-0.4.19 ,您只需添加< a href =....> 到您的 code> target =_ self

Since route_hierarchical-0.4.19 you can simply add a target="_self" to your <a href="...."> to avoid angular router.

这篇关于Angular.dart禁用路由?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆