This project wraps jQuery-DataTables as an ember-component within an ember-cli project template. In doing so, this project acts as a demo application which uses this ember-component to render interactable datatable. Here, the interactions refers to CRUD operations on the rendered dataset. Click on the link to access the online demo app.
You will need the following things properly installed on your computer.
- ember-cli version: 0.1.2
- node: 0.10.32
- npm: 2.1.3
git clone https://github.com/knshetty/emberjs-component-jquerydatatables-example.git
cd emberjs-component-jquerydatatables-example
npm install
bower install
ember server
- Visit the running app at http://0.0.0.0:4200/emberjs-component-jquerydatatables-example.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
Note! As of now, there are no unit tests written for this project.
ember build
(development)ember build --environment production
(production)
###Step1: Setup ember-cli project A. Create an ember-cli project $ ember new emberjs-component-jquerydatatables-example $ cd emberjs-component-jquerydatatables-example/ $ npm install && bower install
B. Manage your dependcies
$ bower install bootstrap --save
$ bower install datatables --save
$ bower install datatables-bootstrap3 --save
C. Install build toolchain
$ npm install --save-dev broccoli-merge-trees
$ npm install --save-dev broccoli-static-compiler
$ ember build
D. Setup project-build environment
Configure 'Brocfile.js' for the build, which includes the following depedencies:
i. "Bootstrap3" UI framework's dependencies
ii. "Jquery.dataTables" dependencies
iii. "Datatables-Bootstrap3" dependencies
E. Setup content security policy
Enable content security policy in-order to download external resources, such as images. Configuration is carried out in 'config/environment.js' by setting the below property:
var ENV = {
...
contentSecurityPolicy: {'img-src': "'self' s.it-ebooks-api.info"},
...
}
F. Conduct a basic smoke test
$ ember server
Visit the running app at http://0.0.0.0:4200/emberjs-component-jquerydatatables-example
###Step2: Enable CoffeeScript (instead of JavaScript): Install ember-cli CoffeeScript code generator $ npm install ember-cli-coffeescript --save-dev
- Emberjs
- ember-cli
- Development Browser Extensions:
- Writing Ember.js Components with Ember CLI (Video Tutorial)
- Ember-cli-coffeescript addon
- Setting Up Ember CLI with Emblem and CoffeeScript
- Violating Content Security Policy directive in Ember-cli
- Sources of inspiration for this project: