angularjs - facing issue while trying to add auth0 into angular web application -
(function() { angular .module('toolbar') .directive('toolbar',toolbar); function toolbar(){ return { templateurl: 'toolbar/toolbar.template.html', controller: toolbarcontroller, controlleras: 'toolbar' } } function toolbarcontroller(auth,$localstorage,$location) { var vm = this; vm.login = login; vm.logout = logout; vm.auth = auth; function login() { auth.signin({},function(profile,token){ $localstorage.profile = profile; $localstorage.id_token = token; $location.path('/companies'); }, function(err){ console.log(err); }) } function logout() { delete $localstorage.profile; delete $localstorage.id_token; auth.signout(); } } })();
i following auth0 video tutorials, did told in video still facing issue:
this above code of directive. , when click html
angular.js:13708 typeerror: cannot read property 'parseoptions' of undefined @ getinnerlibraryconfigfield (auth0-angular-4.js:240) @ object.auth.signin (auth0-angular-4.js:604) @ toolbarcontroller.login (toolbar.directive.js:23) @ fn (eval @ compile (angular.js:14605), <anonymous>:4:270) @ expensivecheckfn (angular.js:15694) @ callback (angular.js:25622) @ scope.$eval (angular.js:17444) @ scope.$apply (angular.js:17544) @ htmlanchorelement.<anonymous> (angular.js:25627) @ defaulthandlerwrapper (angular.js:3488)
i not in angular js please tutorials:https://www.youtube.com/watch?v=wid3v_gmza8
please guys!
Comments
Post a Comment