Angulyar adds one style tag, how to define everything in one file? clone <style>

I use such modules: ngAnimate, ngAria, ngMessages, ngRoute, ngMaterial, textAngular, md.data.table

  • In general, it should not clone, it should only add one at a time. What modules are used? - Grundy
  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

When connecting, some angular modules check which mode of operation is selected and add inline styles depending on the mode, which allows not to connect a separate css file for the module.

To customize the behavior in the angular there is a directive ngCsp

When used with the no-inline-style parameter, for example

 <html ng-app ng-csp="no-inline-style"> 

style tags will stop being added, but it will be necessary to connect the corresponding css file, which is usually located in the same place as the angular module itself.