首页 \ 问答 \ 位置和HashLocationStrategy在beta.16中停止工作(Location and HashLocationStrategy stopped working in beta.16)

位置和HashLocationStrategy在beta.16中停止工作(Location and HashLocationStrategy stopped working in beta.16)

错误信息

VM556 angular2-polyfills.js:349错误:令牌必须被定义!(...)

要么

错误TS2305:模块'“/ node_modules / angular2 / router”'没有导出成员'LocationStrategy'。
错误TS2305:Module'“/ node_modules / angular2 / router”'没有导出成员'HashLocationStrategy'。
错误TS2305:模块'“/ node_modules / angular2 / router”'没有导出成员'位置'。

怎么修


Error message

VM556 angular2-polyfills.js:349Error: Token must be defined!(…)

or

error TS2305: Module '"/node_modules/angular2/router"' has no exported member 'LocationStrategy'.
error TS2305: Module '"/node_modules/angular2/router"' has no exported member 'HashLocationStrategy'.
error TS2305: Module '"/node_modules/angular2/router"' has no exported member 'Location'.

How to fix


原文:https://stackoverflow.com/questions/36861628
更新时间:2021-12-18 17:12

最满意答案

感谢revset的例子。 我绕了一圈,找到了我喜欢的解决方案:

hg log -r "parents(min(branch(foo)))"

它将打印foo分支上第一次提交的修订版本。 您可以在该变更集中查找分支(或缺少指示默认分支),这是foo的父分支(至少在问题中定义父分支的方式)。

但我有这种唠叨的感觉......父母()可能会返回多个变更集。 一个分支上的第一次提交可以有两个父母吗? 我想不出会发生什么。


Thanks for the revset examples. I fiddled around and found this solution that I kind of like:

hg log -r "parents(min(branch(foo)))"

which will print the revision that the first commit on the foo branch was based on. You can look for the branch (or lack thereof indicating the default branch) in that changeset and that is the parent branch of foo (at least the way parent branch is defined in the question).

But I have this nagging feeling...parents() could return more than one changeset. Could the first commit on a branch ever have two parents? I can't think of how that could happen.

相关问答

更多
  • 感谢revset的例子。 我绕了一圈,找到了我喜欢的解决方案: hg log -r "parents(min(branch(foo)))" 它将打印foo分支上第一次提交的修订版本。 您可以在该变更集中查找分支(或缺少指示默认分支),这是foo的父分支(至少在问题中定义父分支的方式)。 但我有这种唠叨的感觉......父母()可能会返回多个变更集。 一个分支上的第一次提交可以有两个父母吗? 我想不出会发生什么。 Thanks for the revset examples. I fiddled aroun ...
  • 我不认为你可以用纯粹的善变来做到这一点,因为没有克隆只有那个分支(我直到你说它不是你的一杯茶时才会提出建议)。 如果它真的杀了你,你可以创建一个小包装脚本,如: #!/bin/sh HG=/full/path/to/hg # executable if echo $* | grep -P -q -- 'push.*\s-r($|\s)' ; then $HG $* else $HG $* -r default fi 将其命名为'hg'并将其放在您的路径中。 I don't think you ...
  • 而不是合并,你想用--collapse选项来使用hg rebase 。 hg rebase --collapse --source [g] --dest [b] Mercurial随附了rebase扩展,您只需在设置文件中启用它。 ps如果您已经提交了合并[k],则应在重新绑定之前先回滚 (或剥离 )它。 Instead of merging, you want to use hg rebase with the --collapse option. hg rebase --collapse --sour ...
  • 这里的问题是Git分支只是提交的指针。 所有作为此提交的祖先的提交被认为是“在分支上”,然后。 但是,如果你看到一个提交只属于一个分支,那么后来的概念就会被打破,因为只有第二个分支会在这方面产生歧义:至少根节点现在在两个分支中。 Mercurial的命名分支 - 无论好坏 - 都是有效的节点着色。 即,您使用一种颜色(指定分支)为您的节点(提交)着色,并且仅使用一种颜色。 所以从根本上说,不可能将Git分支转换为Mercurial命名分支,并保持“X在分支Y上”的含义相同。 如果你想在Mercurial中使 ...
  • hg clone http://your/repo -r branchname应该做的伎俩。 hg clone http://your/repo -r branchname should do the trick.
  • 你可以将hg update到已关闭的分支,然后执行另一个hg commit ,它将自动重新打开。 closed标志只用于过滤掉hg branches和hg heads闭合分支,除非使用--closed选项 - 它不会阻止您使用分支。 You can just hg update to the closed branch then do another hg commit and it will automatically reopen. The closed flag is just used to fil ...
  • 检出分支( hg co branchname )然后hg commit --close-branch将hg commit --close-branch标记为“关闭”。 Checkout the branch (hg co branchname) then hg commit --close-branch to mark the branch "closed".
  • --rev参数将接受一个命名分支。 例如,您可能会执行以下操作: hg archive --rev 这会为您提供指定分支顶端的回购存档。 有关详细信息,请参阅hg help revisions 。 The --rev argument will accept a named branch. For example, you may do something like: hg archive --rev
  • 是的你可以。 您需要关闭所有分支,然后为它们提供所需的名称 PS:好像你只需要在branch命令中添加-f标志 示例场景 hg init echo "123" > file hg addremove hg commit -m "init default" hg branch new echo "new" >> file hg commit -m "init new" hg up default echo "default" >> file hg commit -m "default 2nd" hg co ...
  • 我原本以为我需要一些方法才能进入分支,但在咀嚼之后,我总结出最好的方法是大致如下: 创建所需的新分支结构(即创建4.6和5.0分支)。 将旧的default分支删除到基本存储库中的4.6分支。 将project-5.x存储库拉入project-4.x存储库。 将default (或在此存储库的情况下为experimental )基线(在合并期间拉入)合并到5.0分支中,沿途关闭experimental分支。 限制对旧存储库的中央推/拉位置的写访问权限; 我们仍然有历史原因,但人们不能不小心推动它。 准备(步 ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)