I have an hexo.io application where I'm rendering a lot of html from markdown files. I need to embed an emberjs application into the static html generated files.
Test 1.
- Use ember build command with --output-path to generate app files to the js include folder for hexo.io
- Include the files {applicaiton}.js & vendor.js in hexo.io theme template
- Generate the static html files
Results
- OK ember js files where loaded correctly
- Error
Uncaught Error: Could not read config from meta tag with name "spa/config/environment".
Test 2.
- I include the head meta tag from the index.html of the ember-cli app into the template
meta name="spa/config/environment" content="%7B%22modul..."
This is the config enfironment.js url encoded
Results
- Now I can see the emberjs application detected
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
- The ember inspector is note detecting the application
- This error is also throwed
Uncaught UnrecognizedURLError: /stati-file.html
Now I'm stuck on:
- Fix the UnrecognizedURLError.
- Properly detect the ember app in ember inspector.
- How to include the emberjs outlets in my static html files template.
Aucun commentaire:
Enregistrer un commentaire