ember.js - Can't load bootstrap js via ember-cli-build.js -


in project if include bootstrap's javascrpt file via

app.import(app.bowerdirectory + '/bootstrap/dist/js/bootstrap.min.js'); in ember-cli-build.js bunch of js errors.

if instead include in index.html works fine. idea causing this?

error-

syntaxerror: export declarations may appear @ top level of module 

i can think of 3 things try here:

link full file. had line in (pretty old) app worked fine: app.import(app.bowerdirectory + '/bootstrap/dist/js/bootstrap.js');

make sure app.import inside of main module.exports declaration in ember cli build.

you might try testing out different bower package see if problem bootstrap or app.

if else fails (and if succeeds), highly recommend using ember bootstrap instead. handle stylesheets , provide ember friendly ways implement bootstrap components. won't need import anymore. overall, it's best avoid mixing libraries modify dom (like plain bootstrap) ember components. http://www.ember-bootstrap.com


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -