【问题标题】:electron-forge wont compile component templates from separate HTML fileselectron-forge 不会从单独的 HTML 文件编译组件模板
【发布时间】:2018-09-12 03:32:09
【问题描述】:

我用electron-forge using the angular2 template 建立了一个新项目。一切正常,但后来我尝试将组件模板移动到单独的 HTML 文件中。

我只是从app.component.ts 中提取示例 HTML,将其粘贴到同一目录中的新 app.component.html 中,并且组件已更改...
template: `<h1>template content</h1>`
到..
templateUrl: './app.component.html'

当我现在运行它时,我得到了错误:

Couldn't set selectedTextBackgroundColor from default ()

然后启动的电子窗口只显示一条关于未能编译新模板 HTML 的错误消息。

是否需要进行一些配置才能使用外部模板?还是我在这里遗漏了一些明显的东西?

当/如果我解决了这个问题,我是否会遇到使用styleUrls:[] 添加外部样式表的类似问题?

欣然接受任何建议。今天,我对创建电子/角度应用程序的前景充满童心,但由于无法让任何东西正常工作而慢慢粉碎。

提前致谢!

【问题讨论】:

    标签: angular electron electron-forge


    【解决方案1】:

    尝试使用 npm run watch 编译 de 项目(如果使用 npm),在 laravel 中为我工作,

    如果不使用 npm ,则必须重新编译模板

    祝你好运

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-06
      • 1970-01-01
      • 2012-02-29
      • 1970-01-01
      • 1970-01-01
      • 2017-01-10
      • 1970-01-01
      • 2021-08-07
      相关资源
      最近更新 更多