Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous compile #9594

Merged
merged 1 commit into from
Jun 28, 2016
Merged

Synchronous compile #9594

merged 1 commit into from
Jun 28, 2016

Conversation

tbosch
Copy link
Contributor

@tbosch tbosch commented Jun 25, 2016

No description provided.

@tbosch tbosch changed the title WIP: synchronous compile Synchronous compile Jun 28, 2016
@tbosch tbosch removed the state: WIP label Jun 28, 2016
@tbosch tbosch force-pushed the sync_compile branch 3 times, most recently from 517add5 to 1d3f0c8 Compare June 28, 2016 15:32
@@ -629,6 +656,7 @@ export class CompileTemplateMetadata {
this.templateUrl = templateUrl;
this.styles = isPresent(styles) ? styles : [];
this.styleUrls = isPresent(styleUrls) ? styleUrls : [];
this.externalStylesheets = isPresent(externalStylesheets) ? externalStylesheets : [];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use normalizeArray

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@vicb
Copy link
Contributor

vicb commented Jun 28, 2016

Nice PR ! LGTM

tbosch added a commit to tbosch/angular that referenced this pull request Jun 28, 2016
Adds new abstraction `Compiler` with methods
`compileComponentAsync` and `compileComponentSync`.
This is in preparation of deprecating `ComponentResolver`.

`compileComponentSync` is able to compile components
synchronously given all components either have an inline
template or they have been compiled before.

Also changes `TestComponentBuilder.createSync` to
take a `Type` and use the new `compileComponentSync` method.

Also supports overriding the component metadata even if
the component has already been compiled.

Also fixes angular#7084 in a better way.

BREAKING CHANGE:
`TestComponentBuilder.createSync` now takes a component type
and throws if not all templates are either inlined
are compiled before via `createAsync`.

Closes angular#9594
Adds new abstraction `Compiler` with methods
`compileComponentAsync` and `compileComponentSync`.
This is in preparation of deprecating `ComponentResolver`.

`compileComponentSync` is able to compile components
synchronously given all components either have an inline
template or they have been compiled before.

Also changes `TestComponentBuilder.createSync` to
take a `Type` and use the new `compileComponentSync` method.

Also supports overriding the component metadata even if
the component has already been compiled.

Also fixes angular#7084 in a better way.

BREAKING CHANGE:
`TestComponentBuilder.createSync` now takes a component type
and throws if not all templates are either inlined
are compiled before via `createAsync`.

Closes angular#9594
@tbosch tbosch merged commit bf598d6 into angular:master Jun 28, 2016
@tbosch tbosch deleted the sync_compile branch June 28, 2016 17:41
@marcalj
Copy link

marcalj commented Jul 1, 2016

@tbosch I love you! You fixed couple of bugs with ngUpgrade migration!

  1. Components with forwardRef make app don't bootstrap
  2. Doesn't trigger Angular 1 initial router event, so the app doesn't "bootstrap" any component!!!

Thanks a lot! Cheers!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
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.

None yet

4 participants