Providing Context Variables to Directives
In the component using appDelay
, we access the loadTime
context variable in the same way we access variables in ngFor
.
@Component({
selector: 'app-root',
template: `
<card *delay="500 * item; let loaded = loadTime">
<div class="main">{{item}}</div>
<div class="sub">{{loaded | number:'1.4-4'}}</div>
</div>
`
})