-
Notifications
You must be signed in to change notification settings - Fork 27.2k
ngIf improvements for Rx #13061
Copy link
Copy link
Closed
Labels
area: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packagefeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfreq3: high
Metadata
Metadata
Assignees
Labels
area: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packagefeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfreq3: high
Goals
When writing Rx style code it is often necessary to write code like this
The issue is that:
asynccreates a listener and.?makes coding cumbersome.What is needed is to be able to subscribe to the observable once and then refer to it in subsequent location. Additionally we need a way to display an alternative template while the observable has not yet yielded a value.
Proposal
ngIfto assign data to local value.elsefeature tongIfso that an alternative template can be shown until the observable yields a value.NOTE: the microsyntax is consistent with existing implementation of the microsyntax. For expanded form see: