I'm working on an ember-cli project where I've to include many javascript files such as bootstrap.js, moment.js, progress.js, myCustom.js, data-tables.js, etc files. I tried to put all the files in vendor folder and included in ember-cli-build.js file as
app.import('vendor/bootstrap.js')
app.import('vendor/moment.js')
app.import('vendor/myCustom.js')
app.import('vendor/data-tables.js')
I see all the code from bootstrap.js, moment.js, myCustom.js included in vendor.js file located in dist/assets/vendor.js. So far good, but I do not see the javascript files working in the actual app while I'm running it in browser.
For instance, my data-tables.js file has the logic to sort the table content on click of the sorting button at the top of the column. When I try to sort the column nothing is working, but in vendor.js file the logic is included.
I moved the files from vendor folder to bower_components and changed the import statements accordingly, but no luck.
I'm on this thing since last 2 days and I don't have alternative other than to make it work. Any help would be appreciated or some directions where I need to go. Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire