Like I said, I want to use the existing structural directive string based syntax in custom directive
<element *ngFor='let x of array;let last = last;'></element>
I don't find any detailed docs, how we can decode the above syntax in our custom structural directive. I know we can use this syntax with all structural directive *xyz but I always use [xyz] instead. I try to find angular official docs but got nothing.
So I move into their code to understand *NgFor in github, and I got it all except how they are decoding the syntax.
If you see the selector it is like below
@Directive({selector: '[ngFor][ngForOf]'})
@Input()
set ngForTrackBy(fn: TrackByFunction<T>) {
//definition
}
And all inputs method starts with selector prefix like ngForTrackBy. is it like this only? do we have to follow the selector prefix?
If Yes then what are all other things we can do with this prefix based approach? If no then what is the right approach?