-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reload Page - Parent Css not applied to child - UI Router #55
Comments
Yes, I have the same problem. It looks like module doesn't support property inheritance from the parent states. Actually this is very sad, because without this feature this module has no value to our project. We can't repeat the same definition of styles for every route, this just makes no sense. Are you planning to implement inheritance? |
In the end we will have the complete list of all CSS files from top state to bottom. Of course we will also need a mechanism to override some CSS files, this could be very useful when working with different layouts. We can introduce the concept of named styles. ExamplestateHelperProvider
.state({
name: 'root',
abstract: true,
css: [
'bootstrap.css',
{
name: 'layout', // <========== NAMED STYLE
href: 'primary-layout.css'
}
]
})
.state({
name: 'foo',
parent: 'root',
css: 'foo.css'
})
.state({
name: 'bar',
parent: 'root',
css: [
{
name: 'layout',
href: 'alternative-layout.css' // <========== OVERRIDING THE NAMED STYLE!
},
'bar.css'
]
})
;
What do you think @AlexanderCastillo? |
its not working for me either |
Hello,
When we reload the page on a child state (like /home/profile), the parent css (home.css) is not applied to the child.
Is there a way to persist the css on reload ?
Thanks !
The text was updated successfully, but these errors were encountered: