Skip to content

bootstrap(App, [....]).then((appRef: ComponentRef) is not called for production #451

Closed

Description

@mburger81

In my main.ts i do this

export function main() {
  return browser.bootstrap(App, [
    ...APPLICATION_PROVIDERS,
    ngCore.provide(ngCore.PLATFORM_DIRECTIVES, {useValue: APPLICATION_DIRECTIVES, multi: true}),
    ngCore.provide(ngCore.PLATFORM_PIPES, {useValue: APPLICATION_PIPES, multi: true})
  ])
  .then((appRef: ngCore.ComponentRef) => {
      console.log('ABCDEF');
        // store a reference to the application injector
        appInjector(appRef.injector);
  })
  .catch(err => console.error(err));
}

but on running npm run build:prod the ".then" is not called and so my appInject is not called

Activity

  1. PatrickJS commented on Mar 21, 2016

    @PatrickJS
    Owner

    I was able to get it working. can you try with the latest changes?

  2. mburger81 commented on Mar 22, 2016

    @mburger81
    Author

    @gdi2290 Yesterday evening I downloaded the last version, and on last version it seams to work but I'm not realy sure. On having a empty project it works but including my app I have the same issue as discussed in #456 , and so I'm not able to test if it works realy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions