How do I implement directive (ng-template) in Angular?

In my HTML file, I’ve duplicated the “elseBlock2”. How do I implement directive (ng-template) to handle it?