Revert regression introduced in ngeo displayWindow component #5447
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch fixes an other regression introduced by the automatic changes in: 6d38eed
This time it's the ngeo
displayWindowComponent
.Explanation
An angular component gets its its binding properties (i.e. those defined in the html) being set their values in the $onInit method. In the constructor, their values are not yet set but we do need to type them:
The issue introduced by the auto-patch is that they got values assigned according to their type:
This breaks the setting of the value by Angular in $onInit. Therefore, we should not do that. It's okay to leave the type as
boolean
, because the property itself inthis
will be set to a boolean in $onInit. The angular option (through the biding) is optional but that doesn't matter.There may be more regressions like this.