Skip to content

Commit

Permalink
feat(aurelia): integrate composition transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Feb 16, 2016
1 parent dff04c8 commit 3885118
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/aurelia.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'core-js';
import * as TheLogManager from 'aurelia-logging';
import {Container} from 'aurelia-dependency-injection';
import {Loader} from 'aurelia-loader';
import {BindingLanguage, ViewSlot, ViewResources, TemplatingEngine} from 'aurelia-templating';
import {BindingLanguage, ViewSlot, ViewResources, TemplatingEngine, CompositionTransaction} from 'aurelia-templating';
import {DOM, PLATFORM} from 'aurelia-pal';
import {FrameworkConfiguration} from './framework-configuration';

Expand Down Expand Up @@ -113,7 +113,6 @@ export class Aurelia {
* @return Returns a Promise of the current Aurelia instance.
*/
setRoot(root: string = 'app', applicationHost: string | Element = null): Promise<Aurelia> {
let engine;
let instruction = {};

if (this.root && this.root.viewModel && this.root.viewModel.router) {
Expand All @@ -123,7 +122,10 @@ export class Aurelia {

this._configureHost(applicationHost);

engine = this.container.get(TemplatingEngine);
let engine = this.container.get(TemplatingEngine);
let transaction = this.container.get(CompositionTransaction);
delete transaction.initialComposition;

instruction.viewModel = root;
instruction.container = instruction.childContainer = this.container;
instruction.viewSlot = this.hostSlot;
Expand Down

0 comments on commit 3885118

Please sign in to comment.