You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
For my use case, I'm trying to create an Angular component that mimics the styling and behavior of the XAML command bar. The command bar has one nice feature, that is, it automatically moves command buttons from the primary area to the secondary area if there's not enough width and move them back when there's enough width. Moving command buttons (the projected content) dynamically requires Angular to support dynamic content projection, which is not available at the moment.
This is how the command bar will be used.
<my-command-bar><!-- These command buttons are in the primary area but may be moved to the secondary area if the width is not enough --><my-command-buttonicon="back" label="Back"></my-command-button><my-command-buttonicon="play" label="Play"></my-command-button><my-command-buttonicon="forward" label="Forward"></my-command-button><!-- These command buttons are always in the secondary area --><my-command-buttonlabel="Like" secondary></my-command-button><my-command-buttonlabel="Dislike" secondary></my-command-button></my-command-bar>
The text was updated successfully, but these errors were encountered:
To use ViewContainerRef, I need to get hold of the ViewRefs of the projected command buttons. However, @ContentChildren(MyCommandButton, read: ViewRef) is resolved into an empty list. Is there a way to access the ViewRefs of the projected components?
my_command_bar.dart
classMyCommandBar {
// Resolved into a list of [MyCommandButton].@ContentChildren(MyCommandButton)
QueryList<MyCommandButton> buttons;
// Resolved into an empty list.@ContentChildren(MyCommandButton, read:ViewRef)
QueryList<ViewRef> buttonViewRefs;
@ViewChild('primary', read:ViewContainerRef)
ViewContainerRef primaryContainerRef;
@ViewChild('secondary', read:ViewContainerRef)
ViewContainerRef secondaryContainerRef;
...
}
The same issue for AngularJS can be found here.
For my use case, I'm trying to create an Angular component that mimics the styling and behavior of the XAML command bar. The command bar has one nice feature, that is, it automatically moves command buttons from the primary area to the secondary area if there's not enough width and move them back when there's enough width. Moving command buttons (the projected content) dynamically requires Angular to support dynamic content projection, which is not available at the moment.
This is how the command bar will be used.
The text was updated successfully, but these errors were encountered: