Angularjs 流星中的包冲突:Angular2和模板
我在Meteor的一个项目中进进出出,试图将这个框架文档与Ruby相比较。。。非常糟糕而且支离破碎,我得到了这个错误: 确定活动插件时: 错误:冲突:应用程序barbatus中包含两个包:angular2和 模板都试图处理*.html 这是我安装的软件包:Angularjs 流星中的包冲突:Angular2和模板,angularjs,meteor,Angularjs,Meteor,我在Meteor的一个项目中进进出出,试图将这个框架文档与Ruby相比较。。。非常糟糕而且支离破碎,我得到了这个错误: 确定活动插件时: 错误:冲突:应用程序barbatus中包含两个包:angular2和 模板都试图处理*.html 这是我安装的软件包: autopublish 1.0.4 (For prototyping only) Publish the entire d... blaze-html-templates 1.0.1 Compile
autopublish 1.0.4 (For prototyping only) Publish the entire d...
blaze-html-templates 1.0.1 Compile HTML templates into reactive UI wit...
ecmascript 0.1.5 Compiler plugin that supports ES2015+ in al...
es5-shim 4.1.13 Shims and polyfills to improve ECMAScript ...
flemay:less-autoprefixer 1.1.0 The dynamic stylesheet language + Autoprefixer
insecure 1.0.4 (For prototyping only) Allow all database w...
jquery 1.11.4 Manipulate the DOM using CSS selectors
meteor-base 1.0.1 Packages that every Meteor app needs
mobile-experience 1.0.1 Packages for a great mobile user experience
mongo 1.1.2 Adaptor for using MongoDB and Minimongo ove...
semantic:ui 2.1.4 Official Semantic UI Integration for Meteor
session 1.1.1 Session variable
standard-minifiers 1.0.1 Standard minifiers used with Meteor apps by...
tracker 1.0.9 Dependency tracker to allow reactive callbacks
urigo:angular2-meteor 0.2.0+ Angular2 and Meteor integration
现在,我知道barbatus:angular2是由urigo:angular2 meteor使用的,但我不确定为什么它会与模板冲突,这显然是其他东西所需要的。。。如果不是流星基地本身
我该如何解决这个问题
**编辑**
这是我唯一的.html文件:
基本上,这是一个全新的空项目;如何避免出现此错误?我是否必须严格禁止在我的项目中使用标记?meteor.html文件中只有模板。如果您正在创建角度模板并提供相同的扩展,那么此时它将抛出错误。因为在meteor中,只有主文件有html标记,如果您添加了不同的html文件而没有模板标记,那么它会将其视为html文件,并在构建时在其中添加html标记 因此,如果您正在为angular创建模板,只需将其重命名为somefile.ng.html。
这样在meteor构建时就不会有冲突。在meteor 1.2.0.2中,您可以使用
> meteor remove blaze-html-templates
Changes to your project's package version selections:
blaze-html-templates removed from your project
caching-compiler removed from your project
caching-html-compiler removed from your project
templating removed from your project
templating-tools removed from your project
然后添加必须从GitHub下载的urigo:angular2 meteor包
> meteor add urigo:angular2-meteor
meteor删除blaze html模板
流星移除ecmascript
运行以下命令以删除meteor的默认ecmascript包。
现在应用程序应该可以正常运行了。感谢您的解释,现在我更新了我的问题,因为我认为它不能解决我的问题。您将它放在客户端文件夹下的什么位置??请遵循meteor的文件夹结构。你最近更新了你的流星版本吗?你能分享这个存储库吗?很容易找到原因。文件夹结构与此有什么关系?index.html文件位于项目根目录中。我试图把它放在客户端中,但这并没有改变任何事情。文件夹会改变,因为它会帮助您相应地加载js。如果您将客户端js放在客户端文件夹中,将服务器端js放在服务器文件夹中,则在您的案例中可能会出现js加载问题。请删除angular2并安装urigo:angular。谢谢!这确实解决了关于HTML包冲突的问题。然而,启动tha应用程序后,它不再提供HTML,我看到的只是404错误。
> meteor add urigo:angular2-meteor