Search code examples
htmlcssangularstylesheet

Apply CSS at module level in angular 2


I have developed an application with three big modules. I want to apply some common CSS to 2 modules but the third module will have a different CSS. I do not want to apply the css of the first 2 modules to the third module.

I cannot apply css at component level because each module has many sub modules, component and sub components.

Please suggest a way to implement the CSS at module level.

Thanks In Advance


Solution

  • No, right now you can't do that. It is a pending feature (See this and this).

    However you can apply style to bootstrapped component of your module with /deep/ strategy. See this for more info