Getting error while using canActivate(){}

I am converting a angular web app to ionic but getting error while using canActivate(){}. I am very new to it so unable to find the solution.