Skip to content

Commit

Permalink
Merge pull request #81 from bigopon/delay-injection
Browse files Browse the repository at this point in the history
fix(RouterView, RouteHref): delay element injection
  • Loading branch information
EisenbergEffect authored Jul 27, 2018
2 parents e83bd1b + a465e6e commit 79ab6ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/route-href.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ const logger = LogManager.getLogger('route-href');
@bindable({name: 'route', changeHandler: 'processChange', primaryProperty: true})
@bindable({name: 'params', changeHandler: 'processChange'})
@bindable({name: 'attribute', defaultValue: 'href'})
@inject(Router, DOM.Element)
export class RouteHref {

static inject() {
return [Router, DOM.Element];
}

constructor(router, element) {
this.router = router;
this.element = element;
Expand Down
6 changes: 5 additions & 1 deletion src/router-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import {DOM} from 'aurelia-pal';

@customElement('router-view')
@noView
@inject(DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine)
export class RouterView {

static inject() {
return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];
}

@bindable swapOrder;
@bindable layoutView;
@bindable layoutViewModel;
Expand Down

0 comments on commit 79ab6ab

Please sign in to comment.