Angular generates a unique component ID for each component to apply style encapsulation, restore application state, etc. Our compile code generated the same ID every time some HTML was compiled, and Angular displayed a warning in the console. Applying a different attribute every time makes sure the component ID is different in each compile.