![]() ![]() Specifies the default Material foreground color. The value can be any color, but it is recommended to use one of the pre-defined Material colors, for example "BlueGrey". Specifies the default Material primary color. ![]() The value can be any color, but it is recommended to use one of the pre-defined Material colors, for example "Teal". Specifies the default Material accent color. The dense variant uses smaller sizes for controls and their fonts. The Material Design has two variants: a normal variant designed for touch devices, and a dense variant for desktop. The value can be one of the available themes, for example "Dark". ![]() Thanks to Lars Gyrup Brink Nielsen for reviewing this post.Specifies the default Material theme. In part 3 we’ll introduce more requirements like icon support and disabled state. New use cases emerge all the time and some adjustments will be necessary. ![]() In this post we looked at ngComponentOutlet and how it helps us dynamically create components to support a few basic requirements (outlined in part 1).īut things don’t have to stop here! MyButton component will rarely stay as it is right now. We can easily add another button type by creating a new component and adding it to the switch statement. Well, visually the buttons still look the same but the code behind them is more organized. The node can be any element that implements the Node interface like a text node, div, span, etc. This also means that we can project more than one node elements into the component. * Note: The type of content is any hence the double square brackets around buttonContent. buttonContent is a local variable that references the div element. We send two properties to ngComponentOutlet - buttonComponentType, which holds the component that we want to instantiate, and content which takes a list of nodes to project into element(s) inside the component. Enter fullscreen mode Exit fullscreen mode ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |