create(): Promise<void> {
    return bootstrap(aurelia => {
      return Promise.resolve(this._configure(aurelia)).then(() => {
        aurelia.use.globalResources(this._resources);

        return aurelia.start().then(a => {
          let host = DOM.createElement('div');
          host.innerHTML = this._html;

          DOM.querySelectorAll('body')[0].appendChild(host);
          aurelia.enhance(this._bindingContext, host);

          this.element = host.firstElementChild;
        });
      });
    });
  }
Ejemplo n.º 2
0
import { bootstrap } from 'aurelia-bootstrapper';

bootstrap(aurelia => {
  aurelia.use
    .standardConfiguration()
    .developmentLogging()
    .plugin('aurelia-animator-css');

  aurelia.start().then(a => a.setRoot("app", document.body))
  //  aurelia.start().then(() => aurelia.setRoot());
});