javascript - AngularJS Component wont allow Injection into Lifestyle Hook -


im using angular 1.5 , building application in component structure. unknown provider error when i'm attempting inject $canactivate hook (which shouldn't happen) heres code:

angular.module("app") .component("index", {     templateurl:"/modules/index-app.component.html",     $canactivate:function($timeout) { <-- creates error         return $timeout(function() {             console.log('timeout fired')         }, 2000);     },     controller:function($timeout, $location, authcookie) {           // set 'this'         var model =     },     controlleras:"model", }); 

im running angular 1.5.3 if makes difference? if don't inject hook runs fine. i'd love know people's thoughts :)


Comments

Popular posts from this blog

ruby on rails - Permission denied @ sys_fail2 - (D:/RoR/projects/grp/public/uploads/ -

c++ - nodejs socket.io closes connection before upgrading to websocket -

java - What is the equivalent of @Value in CDI world? -