swimlane / angular1-systemjs-seed

AngularJS 1.x + SystemJS Seed
MIT License
211 stars 40 forks source link

CSS does not refresh #34

Closed zeeshanjan82 closed 9 years ago

zeeshanjan82 commented 9 years ago

I have almost implemented the seed project , I have just done a small update to the seed project , I added 2 states : main & portfolio. I also added .less files for each of the states. Now when I have defined the links for both the states in my index.html file and when I load my application by default main state gets loaded and it also loads the .css file for the main state which is good. when I click on the portfolio state then I am able to navigate to the portfolio page and the corresponding .css for the portfolio gets loaded. I have placed body background color red in the main state and yellow in the portfolio state. so far everything works as expected. Now the problem comes when I navigate back from the portfolio state to the main state, at that time the .css file for the main state is not loaded and it still has the css of the portfolio state loaded, so my question is how can I load the .css of the main state when I navigate back to the main state form portfolio state.

**In above issue where ever I have mentioned 'loaded' I mean 'applied on the page'

marjan-georgiev commented 9 years ago

Guy gave you the right advice in the issue you opened in the plugin-css repo. Scope your CSS well so it doesn't get overridden when new styles are loaded, and you should not see this problem any more.

zeeshanjan82 commented 9 years ago

Thanks @marjan-georgiev you are my rock-star ;)