Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Conversation

@Brocco
Copy link
Contributor

@Brocco Brocco commented Nov 2, 2017

No description provided.

@Brocco Brocco requested a review from hansl November 2, 2017 15:39
@Brocco Brocco requested a review from filipesilva November 2, 2017 20:21
],
bootstrap: [AppComponent],
})
export class AppServerModule {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be __rootModuleFileName__ instead of AppServerModule.

test: options.test,
tsconfig: options.tsconfigFileName,
testTsconfig: options.testTsconfigFileName,
environmentSource: 'environments/environment.ts',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

environments should be used together with environments, or not at all.

@Brocco Brocco force-pushed the universal-schematic branch from d47daa4 to c6f8c29 Compare November 10, 2017 19:26
@Brocco
Copy link
Contributor Author

Brocco commented Nov 10, 2017

I've addressed the comments from @filipesilva

@Toxicable
Copy link

Would it be possible to augment the main.ts to include

document.addEventListener('DOMContentLoaded', () => {
  platformBrowserDynamic().bootstrapModule(AppModule);
});

This is essential for StateTransfer which is a likely addition to Universal and often overlooked/unknown

@vikerman
Copy link
Contributor

Opened angular/angular#20484 to investigate how to avoid the race condition in TransferState without needing specific way to bootstrap the client side. We should make TransferState work more transparently to the user.

@Brocco Brocco force-pushed the universal-schematic branch 4 times, most recently from 70d9753 to 0eec4c0 Compare November 20, 2017 15:57
filipesilva
filipesilva previously approved these changes Nov 20, 2017
const recorder = host.beginUpdate(mainPath);
const beforeText = `document.addEventListener('DOMContentLoaded', () => {\n `;
const afterText = `\n});`;
recorder.insertRight(bootstrapCall.getStart(), beforeText);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically insertLeft ;)

@hansl hansl merged commit 51e773a into angular:master Nov 21, 2017
@Brocco Brocco deleted the universal-schematic branch November 27, 2017 20:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants