Angular routers render the components they have navigated to using a router outlet directive. Unless a specific router outlet directive is specified, Angular will automatically place the routed component within an <ng-component>
element (i.e., a default router outlet directive). You generally don't use this directive directly. You'd invoke it by using a <router-outlet>
element. In other words, ng-component
is the default tag name of the injected element, if another directive isn't given.
So yes, it is generally used internally. As stated here:
You could attach styles to the "ng-component" selector; however, given
the fact that a parent component may contain multiple router-outlet
elements (for named and unnamed views), providing a unique local
handle would make CSS selectors a bit more intuitive.