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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -