我正在使用JavascriptMVC但未能使the following example正常工作。我一步一步地跟着它。页面'确实'显示但我看到的只是食谱标题。当我使用firebug时,我确实看到以下代码:
<h2>Recipes</h2>
<ul id="recipes"></ul>
<form id="create"></form>
然而,表格,物品都没有显示出来。我在Windows 8.1上尝试过最新的Firefox稳定版本,Arora,最新的google chroom和Internet Explorer。有没有其他人遇到这个问题?我会在他们的论坛上问,但注册网页不起作用。
作为参考,这是我在构建项目时的命令:
I:\stage\analyse\bijlagen\voorbeelden\javascriptmvc>js jmvc/generate/app cookbook
cookbook/cookbook.js
cookbook/cookbook.less
cookbook/cookbook.md
cookbook/cookbook_test.js
cookbook/index.html
cookbook/test.html
cookbook/models/fixtures/fixtures.js
cookbook/scripts/build.html
cookbook/scripts/build.js
cookbook/scripts/clean.js
cookbook/scripts/crawl.js
cookbook/scripts/docs.js
I:\stage\analyse\bijlagen\voorbeelden\javascriptmvc>js jmvc/generate/scaffold cookbook/models/recipe
cookbook/models/recipe.js
cookbook/models/recipe_test.js
cookbook/cookbook_test.js (steal added)
cookbook/models/fixtures/fixtures.js (code added)
cookbook/recipe/create/create.html
cookbook/recipe/create/create.js
cookbook/recipe/create/create_test.js
cookbook/recipe/create/init.ejs
cookbook/recipe/create/test.html
cookbook/recipe/list/init.ejs
cookbook/recipe/list/list.html
cookbook/recipe/list/list.js
cookbook/recipe/list/list_test.js
cookbook/recipe/list/test.html
cookbook/cookbook_test.js (steal added)
cookbook/cookbook_test.js (steal added)
cookbook/cookbook.js (steal added)
cookbook/cookbook.js (steal added)
cookbook/cookbook.js (code added)
cookbook/index.html (html added)
cookbook/cookbook_test.js (code added)
答案 0 :(得分:0)
我也遇到了同样的事情。关于chrome的教程中的警告让我相信其他浏览器(比如我测试过的IE)没有那个问题,但看起来确实如此。
不管怎样,我把&#34; - allow-file-access-from-files&#34;作为chrome的启动参数,它运行正常。