Another way you can do this with a single state declaration:
.state('profile.detail', { url: '/:version', templateUrl: function($stateParams){ return $stateParams.version +'.html'; }, controller: 'appCtrl' })
Then enter $ stateParams into the controller and check $stateParams.version
source share