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

Instantiate Component Controller During Post Link Phase #109

Open
timkindberg opened this issue Nov 30, 2015 · 3 comments
Open

Instantiate Component Controller During Post Link Phase #109

timkindberg opened this issue Nov 30, 2015 · 3 comments

Comments

@timkindberg
Copy link
Contributor

I think we should wait until the post link phase until we invoke the Component's controller function. This way we'll know that we can have access to the child directives/components and they'll be fully linked and ready to go. This is a prerequisite to being able to query child components with @ContentChild and @ViewChild.

@timkindberg timkindberg added this to the Milestone 2 milestone Nov 30, 2015
@timkindberg
Copy link
Contributor Author

@MikeRyanDev
Copy link
Member

Another idea is to keep controller instantiation as-is, perform lookup during the link phase, and then call the controller's onInit lifecycle hook at that point. Might be a safer option and it leverages part of our Angular 2 polyfilling plans.

@timkindberg
Copy link
Contributor Author

Ah yes... I think that might be more how Angular 2 works anyway.

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

No branches or pull requests

2 participants