Skip to content

Conversation

@YourDeveloperFriend
Copy link
Collaborator

No description provided.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 9, 2019
heightObs: Observable<number>
) {
return combineLatest(playerObs, widthObs, heightObs)
.subscribe(([player, width, height]) => player && player.setSize(width, height));
Copy link
Member

Choose a reason for hiding this comment

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

Any reason not to just call setSize in ngOnChanges without the streams?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Width and height are needed for the constructor of the player as well, and I think a stream fits better when managing the player initialization. I could use ngOnChanges for the setSize call, but that won't eliminate the streams entirely, so I think it'll just add complexity if we have two different means of monitoring changes on the same value.

@YourDeveloperFriend
Copy link
Collaborator Author

This PR is ready for review.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn
Copy link
Member

Looks like there'a a build error on CI

@YourDeveloperFriend
Copy link
Collaborator Author

PR is ready for review (I fixed the build errors).

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Aug 16, 2019
@jelbourn jelbourn merged commit 8093b81 into angular:master Aug 16, 2019
@YourDeveloperFriend YourDeveloperFriend deleted the inputs branch August 16, 2019 20:43
@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 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants