xPages 和 AngularJS - 标签属性中的命名空间前缀导致 DDE 中出现错误
我想在我的 xPages 应用程序中使用 AngularJS http://www.angularjs.org 但我发现了一个奇怪的问题Angular 使用的语法与 xPages 冲突。 Angular 添加了特殊的标签属性,这些属性是 Angular 引擎/编译器的命令。通常,Angular 使用具有“ng”命名空间的属性。例如,
<div ng:app="" ng:controller="">
... content here ...
</div>
当我将这些属性放入 xPages 中时,编辑器将其作为错误引发,因为没有定义这样的“ng”命名空间。当我在 xPage 标记中定义此命名空间时,DDE 中没有错误,但 Domino 从属性名称中删除了此“ng”前缀,因此事情不起作用,我在浏览器中得到此输出:
<div app="" controller="">
... content here ...
</div>
有没有办法,如何解决这个问题吗?
I would like to use AngularJS http://www.angularjs.org in my xPages app but I found a strange problem that syntaxt, that Angular is using, colides with xPages. Angular adds special tag attributes that are commands for angular engine/compiler. Typicly Angular uses attributes with 'ng' namespace. e.g.
<div ng:app="" ng:controller="">
... content here ...
</div>
When I put these attributes into xPages, editor raises it as an error because there is no such 'ng' namespace defined. The when I define this namespace in xPage tag, there is no error in DDE but Domino removes this 'ng' prefix from attributes names, so things do not work and I'm getting this outpput in browser:
<div app="" controller="">
... content here ...
</div>
Is there a way, how to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(2)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
xpages 源代码生成器正在删除前缀,如果您有 8.5.3,则可以执行此操作。
如果您还没有使用 8.5.3,则必须执行以下操作:
the xpages source code generator is removing the prefixes, if you have 8.5.3, you can do this.
If you are not on 8.5.3 yet, you would have to do something like this: