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

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

问题描述

我只在我的页面的一部分上使用 Angular.dart...其余部分包含另一个 Dart 应用程序(编译成 JS...一切都在 Dart 的 JS 中)和其他一些 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">Another page</a> 时实际上可以正常工作,更改地址栏中的 URL?现在它只是去 # 并且我的所有链接都被禁用.我什至没有使用 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 你可以简单地添加一个 target="_self" 到你的 <代码><a href="...."> 以避免角度路由器.

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天全站免登陆