Closed janbee closed 6 years ago
I haven't tested with ui-router resolvers but I can do a bit of debugging if you're able to provide a plunkr of what you're trying to do.
I made it work, seems like its working like this
publicMod.component('public', { template: require('./public.html'), bindings: { $me:'<' }, controller: publicMod.classy.controller({ name :'PublicCtrl', inject:['$scope','$state','$element'], methods: { $onInit:function(){ let self =this; console.log("2cheasdasdadasck data",self.$me); } }
})
});
the "self.$me" var is the promise from ui router resolve. But is it safe to use the $onInit?, just like using it on the old component way like below
|.component('myPane',{controller:function(){this.$onInit =function(){console.log(this);};},templateUrl:'my-pane.html'});|
Cheers, Janbee On 11/04/2017 4:03 PM, Dave Jeffery wrote:
I haven't tested with ui-router resolvers but I can do a bit of debugging if you're able to provide a plunkr https://plnkr.co/ of what you're trying to do.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/davej/angular-classy/issues/51#issuecomment-293182200, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-uzLauJAGBYXqsvcyUVKCMDclA4b_xks5ruzPXgaJpZM4M5mix.
It's difficult for me to debug because I'm not familiar with ui-router. If you put it in a plunkr then I should be able to answer you better.
Hi, Im using 1.2.4 classy, I have an issue using ui router resolve
using the normal this is working with $onInit
in angular classy init:function its not
any advice?