Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(paged): inject the EntityManager
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyvergnas committed Feb 10, 2017
1 parent bf65e2b commit e77e733
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/component/paged.js
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,10 @@
import {logger} from '../aurelia-orm'; import {logger, EntityManager} from '../aurelia-orm';
import {bindingMode} from 'aurelia-binding'; import {bindingMode} from 'aurelia-binding';
import {bindable, customElement} from 'aurelia-templating'; import {bindable, customElement} from 'aurelia-templating';
import {inject} from 'aurelia-dependency-injection';


@customElement('paged') @customElement('paged')
@inject(EntityManager)
export class Paged { export class Paged {


// https://github.com/aurelia/templating/issues/73, you still had to set `data` on .two-way when global // https://github.com/aurelia/templating/issues/73, you still had to set `data` on .two-way when global
Expand All @@ -14,6 +16,10 @@ export class Paged {
@bindable resource @bindable resource
@bindable limit = 30; @bindable limit = 30;


constructor(entityManager) {
this.entityManager = entityManager;
}

/** /**
* Attach to view * Attach to view
*/ */
Expand Down

0 comments on commit e77e733

Please sign in to comment.