# Dynamic UI with CDK TemplatePortal and DomPortalHost

DevFeed: [Dynamic UI with CDK TemplatePortal and DomPortalHost](<https://devfeed.tech/articles/dynamic-ui-with-cdk-templateportal-and-domportalhost-21329.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2018/05/dynamic-UI-with-cdk-portals/>)

Published: 2018-05-25T00:00:00Z

Content type: article

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [angular-material](<https://devfeed.tech/tags/angular-material.md>), [cdk](<https://devfeed.tech/tags/cdk.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

The article presents Angular CDK Portals as a way for routed components to place context-specific page actions in an application toolbar without depending directly on the toolbar. Its example is a mobile-style app where activating a screen should show that screen's actions, whose callbacks still invoke functions on the routed component. A shared service could pass a template reference, but the article chooses CDK Portals. It describes the CDK as a library of reusable building blocks from the Angular Material team that can be used without adopting Material Design. The excerpt does not include the portal setup or code.

## Source excerpt

Lorem ipsum dolor sit amet