I have DOM that looks something like this:
... >
For me it helped to wrap the router-outlet into another container.
Like this you could apply the class to the surrounding container.