Skip to content

Is it compatible with ui router $stateParams? #4

Description

@Emnalyeriar

Is it possible to return a string from a function to the css property in ui router? Because I would like to use the $stateParams to set the path to css file. Something like this:

.state('State', {
    url: '/page/:id',
    controller: 'Ctrl',
    templateUrl: function($stateParams){
        return $stateParams.id+'/views/index.html';
    },
    css: function($stateParams) {
        console.log($stateParams);
        return $stateParams.id+'/styles/main.css'
    }
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions