I have a website build by AngularJS and angular-ui-router. In index.html, I load a lot of .js and .css files.
Now, I realize that a part of these .js and .css files are not necessary for the routes like https://localhost:3000/addin/.... So I want to load them by ocLazyLoad only for routes like https://localhost:3000/xxxxx/... where xxxxx is not addin.
Does anyone how to accomplish that in the code?
Try
Update
As per what you asked in your comments, you can't have like
notforstates. You need to mapstatesexplicitly.One way I can think for creating a state which is
not/addin, is to first explicitly map them in$stateProviderand then redirect via someredirectstate and then load modules which you want to lazy load.Redirect states other than
addinby doing somthing like this for redirection