我正在使用旧版本的ember-cli(0.0.40),在没有版本更新的情况下进行一些更改,应用程序在chrome中工作正常。但当我检查它的Internet Explorer 11时,它会抛出错误:
Error: Assertion Failed: Unable to find view at path 'wizard-menu'
这是申请日志:
[ ] view:wizard-menu ........................................... scripts/wizard-menu/view
[ ] view:wizard-menu ........................................... undefined
[ ] view:wizard-menu ........................................... undefined
[ ] view:wizard-menu ........................................... scripts/views/wizard-menu
[ ] view:wizard-menu ........................................... scripts/wizard-menu/view
[ ] view:wizard-menu ........................................... undefined
[ ] view:wizard-menu ........................................... undefined
[ ] view:wizard-menu ........................................... scripts/views/wizard-menu
[ ] view:wizard-menu ........................................... undefined
SCRIPT5022: Error: Assertion Failed: Unable to find view at path 'wizard-menu'
File: vendor.js, Line: 13269, Column: 9
文件位于以下路径中:
... \脚本\应用\视图\向导menu.js
我在模板中使用了视图助手:
{{view "wizard-menu" }}
在app.js里面我定义了前缀:
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
Ember.MODEL_FACTORY_INJECTIONS = true;
var App = Ember.Application.extend({
modulePrefix: 'scripts',
Resolver: Resolver
});
loadInitializers(App, 'scripts');
export default App;
在我的index.cshtml文件中,我使用带有以下代码的脚本:
<script>
window.ScriptsENV = { "baseURL": "/", "locationType": "hash", "EmberENV": { "FEATURES": {} }, "APP": { "LOG_RESOLVER": true, "LOG_ACTIVE_GENERATION": true, "LOG_MODULE_RESOLVER": true, "LOG_VIEW_LOOKUPS": true }, "LOG_MODULE_RESOLVER": true };
window.EmberENV = window.ScriptsENV.EmberENV;
</script>
<script>
window.Scripts = require('scripts/app')['default'].create(ScriptsENV.APP);
</script>