@gewd/ng-utils

Utils for your Angular App :)

Usage no npm install needed!

<script type="module">
  import gewdNgUtils from 'https://cdn.skypack.dev/@gewd/ng-utils';
</script>

README

@gewd/ng-utils

Utils for your Angular App :)

NPM Version Package Size

@gewd/ng-utils/dynamic-portal

Create a dynamic portal, e.g. in your header, and fill it with a template content from lazy-loaded a route-component.

<!-- define your portal source, in any active component -->
<ng-template dynamicPortalSource="yourPortalKey">
  Any content you want to show in your targeted dynamic portal
</ng-template>

<!-- some where else in your app, different component  -->
<dynamic-portal key="yourPortalKey" class="your-style">
  Dynamic Portal Placeholder, until the template for `yourPortalKey` not been set
</dynamic-portal>

dynamic portal example

@gewd/ng-utils/ng-inspect

Lets you inspect the properties of a component. You can also edit string/number/bool properties.

Add this to your app.component.html:

<ng-inspect></ng-inspect>

Hold ctrl so select a component.