将emberjs应用程序嵌入到静态站点henerator hexo.io中

时间:2015-05-05 17:12:15

标签: javascript ember.js hexo

我有一个hexo.io应用程序,我从markdown文件渲染了很多html。 我需要在静态html生成的文件中嵌入一个emberjs应用程序。

测试1。

  • 使用带有--output-path的ember build命令生成应用程序文件到hexo.io的js include文件夹
  • 包含文件{applicaiton} .js& hexo.io主题模板中的vendor.js
  • 生成静态html文件

结果

  • 确定 ember js文件正确加载
  • 错误 Uncaught Error: Could not read config from meta tag with name "spa/config/environment".

测试2。

  • 我将ember-cli应用程序的index.html中的头元标记包含到模板

meta name="spa/config/environment" content="%7B%22modul..."

这是配置enfironment.js url编码

结果

  • 现在我可以看到检测到的emberjs应用程序

DEBUG: -------------------------------

vendor.js:15751 DEBUG: Ember : 1.11.1

vendor.js:15751 DEBUG: Ember Data : 1.0.0-beta.16.1

vendor.js:15751 DEBUG: jQuery : 1.11.3

vendor.js:15751 DEBUG: -------------------------------

(program):66 Ember Inspector Active

  • 余烬检查员注意检测应用程序
  • 此错误也被抛出 Uncaught UnrecognizedURLError: /stati-file.html

现在我坚持:

  • 修复UnrecognizedURLError。
  • 在ember检查员中正确检测到余烬应用程序。
  • 如何在我的静态html文件模板中包含emberjs出口。

0 个答案:

没有答案
相关问题