0

我做了我的研究,但我仍然不清楚。似乎曾经如此,当时 Chrome 应用程序仍被称为 Chrome 打包应用程序。

导航是 Chrome 应用程序的禁忌吗?这对我来说听起来不合适。使用视图似乎是要走的路……

尝试使用 ngView 时出现以下错误:

XMLHttpRequest cannot load chrome-extension://opjofdlbcghpdgfhmpdfmadlnmnblijo/views/main.html. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

即使使用以下错误仍然存​​在:

$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension):/);

(此行在相关答案中,稍后我将尝试在此处获取链接)

内联模板也不这样做。显然。

因此,我正在寻找有关此主题的最新信息。以下文章很棒:http ://www.ng-newsletter.com/posts/chrome-apps-on-angular.html 。但是 Github 上可用的代码并不像所说的那么完整,所以我在尝试测试它时遇到了一些麻烦。

当然可以使用 ngHide、ngShow、ngIf 等……但是在单独的文件中包含模板要好得多……

4

0 回答 0