Set templateUrl dynamically


#1

Hello,
I’m new in ionic and I want to know how to set templateUrl dynamically.
I tried with this

 .state('app.measures', {
    url: "/patients/device/:deviceRef/:patient",
    views: {
      'menuContent': {
        templateUrl: function ($stateParams){
   				 var s = '/templates/devices/' + $stateParams.deviceRef + '.html';
   				 return s;
   				 },
        controller: 'DeviceCtrl'
      }
    }
  })

This solution works in browser but it doesn’t work on android.

How can I handle it?

Thank you.