-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
detectChanges is being triggered from setInput and setRouteParam #574
Comments
This seems to be the culprit at a glance
|
Can confirm I ran into this with regards to |
You're welcome to submit a PR |
any news ??? please let us know |
You could use This method allows you to set multiple params, queryParams, data etc. via the For example:
|
Is this a regression?
Yes
Description
After setting up a component with
detectChanges
disabled (set to false increateRoutingFactory
orcreateComponentFactory
),detectChanges
is called which triggers the ngOnInit to be called. If however, other setup needs to be set for the test to work during initialisation, there is now no opportunity to set the second. The second call does not triggerngOnInit
as it's already been called.There is a workaround for
setInput
by setting multiple input parameters concurrently in the one statementBut, this syntax is not available on
setRouteParam
.Regardless, this is a regression and the fix is not to add additional multi-parameter overload to
setRouteParam
, but rather to respect the fact that it's not the framework's responsibility to calldetectChnages
when it's been disabled.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: