Providing Context Variables to Directives

    View Example

    In the component using appDelay, we access the loadTime context variable in the same way we access variables in ngFor.

    1. @Component({
    2. selector: 'app-root',
    3. template: `
    4. <card *delay="500 * item; let loaded = loadTime">
    5. <div class="main">{{item}}</div>
    6. <div class="sub">{{loaded | number:'1.4-4'}}</div>
    7. </div>
    8. `
    9. })