NGXF
  • 🚀Introduction
  • Get Started
    • Why
    • Installation
  • Concepts
    • Introduction
  • Features
    • Activated Route
    • Call
    • Init
    • Lazy
    • Keep Alive
    • Timeout
    • Track By Key
    • Repeat
    • Virtual Scroll
  • Server Interaction
    • Async
    • Cookies
    • Http
    • Socket.IO
  • Hooks
    • State Hook
    • Effect Hook
    • Reducer Hook
  • Recompose
    • Compose
  • API
    • NgxfModule
    • HttpDirective
    • RouteDirective
    • InitDirective
    • ComposeDirective
    • ReturnDirective
    • TimeoutDirective
    • CookiesDirective
    • AsyncDirective
    • LazyDirective
    • CallPipe
  • Recipes
    • Caching
    • Style Guide
  • Community
    • FAQ
    • Contributing
Powered by GitBook
On this page
  1. Recompose

Compose

Provides template composition in templates.

Create Enhancer with Rename Prop

An example in COMPONENT.template.html.

<ng-container *compose="let enhancer of [rename]">
  <div *ngTemplateOutlet="enhancer(greet) context { text: 'Hello, World!' }"></div>
</ng-container>

<ng-template #rename>
  <ng-container *renameProp="'text' to 'name'"></ng-container>
</ng-template>

<ng-template #greet let-name="name">{{ name }}</ng-template>

<!-- Will show `Hello World!` -->

PreviousReducer HookNextNgxfModule

Last updated 6 years ago