shaialon / ember-admin-dashboards

DEPRECATED. An Ember-Cli Project - Starter admin template based on AdminLTE. Has an example real data dashboard using twitter stream.
https://ember-admin-dashboards.herokuapp.com
Other
164 stars 46 forks source link

Q About the 'ember way' #10

Closed basz closed 9 years ago

basz commented 9 years ago

I found this project to be very informing on how to start an ember app! Thanks a lot.

Would you mind pointing me into the right direction when you mention the 'ember way' of initializing a bunch of jQuery plugins.

https://github.com/shaialon/ember-admin-dashboards/blob/f23db2114549f3ae90592c3cc8d8ab49dd13f8f6/app/components/application-sidebar.js#L17

shaialon commented 9 years ago

Hi @basz , Sorry for the late reply, I am currently on vacation (yet still coding now and then)... Glad this project is helpful to you. Feel free to contribute. To answer your question:

  1. The Admin LTE base uses $.AdminLTE = {}; Basically they put an Object on top of jQuery (which lives in the window scope). This global object serves all kinds of utilities in the app. Using an Ember service would be a cleaner approach.
  2. jQuery plugins should usually be encapsulated as ember-addons that wrap the jQuery module as an Ember component. Example: https://www.npmjs.com/package/ember-select-2