In Angular 2.0 – core directives are not automatically available in your templates. Instead you have to opt in to the directives you plan to use in your components. In cases where you need several it may seem a bit tedious to list out every single one. In the following post I will show how to include all core directives using the predefined 'CORE_DIRECTIVES' constant.
The code listing below shows how to define a component with access to all core directives:
The key to including all directives is the imported 'CORE_DIRECTIVES' constant.
As you can tell from the template I am now able to use built in directives like ng-for and ng-if without listing them out individually in the component.
I have added this sample code to my Github repo.
You can also see a live demo here.