Skip to content

Is it compatible with ui router $stateParams? #4

@Emnalyeriar

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'
    }
});

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions