Angular 5 adds 'ng-star-inserted' in some classes - what is that?

JavascriptCssAngularAngular Template

Javascript Problem Overview


I'm seeing that among the classes added to an element, sometimes there's this 'ng-star-inserted' added as well and I'd like to know more as to why is it there?

Javascript Solutions


Solution 1 - Javascript

It's a class name that is used internally by the BrowserAnimationsModule when animating entry and leaving transitions. You can see it in the source code here.

Solution 2 - Javascript

This class cause problem with the UI so need to replace with a <ng-container *ngIf=""></ng-container>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionvzRView Question on Stackoverflow
Solution 1 - JavascriptBen ElliottView Answer on Stackoverflow
Solution 2 - JavascripteliprodigyView Answer on Stackoverflow