Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Monaca 调试器中遇到模板解析错误。使用时monaca preview,它在浏览器中运行没有任何问题,但是当我使用时monaca debug,我看到“错误:模板解析错误:无法绑定到'ngif',因为它不是'span'的已知属性。” 在应用日志中。我仔细检查过,错误是由“*ngif”指令引起的。
monaca preview
monaca debug
我也检查过 - 所有 Angular 指令也会导致同样的问题。
我附上了 Applog 的截图。
我已经在这里交叉发布了这个。
你应该有 2 个 webpack 配置文件,开发和生产。webpack.prod.config.js正在使用 HTMLWebpackPlugin 来缩小 HTML。只需将caseSentisive: true选项添加到缩小配置(大约第 120 行)。HTMLWebpackPlugin 的所有选项在这里和它的缩小器在这里。
webpack.prod.config.js
caseSentisive: true
我刚刚将此选项添加到默认模板中。希望能帮助到你!
useAsDefault: true在 的子路由中设置application.route.ts。
useAsDefault: true
application.route.ts
即我们必须指定默认打开哪个路由。