Skip to content Skip to sidebar Skip to footer

Dynamic Change Of Templateurl In Ui-router From One State To Another

html: {{t.name}} Above code is in ng-repeat with many template links loaded with name an

Solution 1:

I would say that you are on the right track.. just URL construction should be adjusted like this:

templateUrl: function($stateParams){
    //return './views/tools/selected-template'+'$stateParams.provider'+'.html'return'./views/tools/selected-template'+ $stateParams.provider +'.html'
}

See more here, what we can have with UI-Router when working with dynamic template link:

Post a Comment for "Dynamic Change Of Templateurl In Ui-router From One State To Another"