3

I need access to resolves in my templateProvider. The documentation says this is possible does it doesn't look like it actually works. Does anyone know if I'm doing this wrong or if it simply doesn't work?

http://plnkr.co/edit/yitkre1ttB8TehbhClR2?p=preview

// Code goes here

angular.module('app', ['ui.router']).config(function($stateProvider, $urlRouterProvider) {
  $stateProvider.state('root', {
    url: '/root',
    resolve: {
      test: function() {
        return 'world';
      }
    },
    templateProvider: function(test) {
      return 'hello ' + test;
    }
  });

  $urlRouterProvider.otherwise('root');
});
micah
  • 7,596
  • 10
  • 49
  • 90
  • it is version issue. "https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js" add latest ui-router script will solve your issue – Krupesh Kotecha Oct 15 '15 at 12:01

1 Answers1

0

unfortunately, this doesn't work. I found this trying to solve it myself too. :(