angular.js - How to reference css in angularjs
为情所困
为情所困 2017-05-15 16:50:16
0
1
837

RT, the route loads different pages, so how to load the css corresponding to these pages
For example

.state('active',{
    url : '/active',
    templateUrl : 'tpls/active.html'
})

How should I load the corresponding css? Some people recommend that I mix the css in one file and load it from the beginning, but this is too coupling, and it is easy to cause conflicts in one file, and it is easily affected by other attributes. If you add a prefix, the class name is too long. It gives me a headache just looking at it...

为情所困
为情所困

reply all(1)
巴扎黑

Someone has already encapsulated this aspect:

  • How to specify CSS for each view in angular routing
  • angular-route-styles
  • ocLazyLoad - Load modules on demand (lazy load) in AngularJS
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template