UI Router's Resolve and TypeScript -


i'm curious how go using ui router's resolve typescript.

.state("signin.notactivated", <ng.ui.istate> {                     controller: "signinctrl",                     controlleras: "signin",                     url: "/notactivated",                     resolve: {                         inprogress: function() {                             return { formdata : null }                         }                     }                 }) 

in controller, have injected resolve.

constructor(public $state : angular.ui.istate, private inprogress) {             this.init();                         }          private init = () => {             this.somedata = this.inprogress.formdata; // error         } 

i getting unknown provider error, because typescript trying register service.

enter image description here

can done?

try injecting this:

static $inject = ['$state', 'inprogress']; constructor(public $state : angular.ui.istate, private inprogress) {     this.init();                 } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -