javascript - Infinite Loop when setting requireADLogin: true, on $stateProvider -
i have following piece of code, want instead of use route provider, use state provider.
function config($stateprovider, $urlrouterprovider, $oclazyloadprovider, idleprovider, keepaliveprovider, adalauthenticationserviceprovider, $httpprovider) { adalauthenticationserviceprovider.init( { instance: 'https://login.microsoftonline.com/', tenant: 'mysaasapp.onmicrosoft.com', clientid: '33e037a7-b1aa-42ab-9693-6c22d01ca338', extraqueryparameter: 'nux=1', //cachelocation: 'localstorage', // enable ie, sessionstorage not work localhost. }, $httpprovider ); // configure idle settings idleprovider.idle(5); // in seconds idleprovider.timeout(120); // in seconds $urlrouterprovider.otherwise("/dashboards/dashboard_1"); $oclazyloadprovider.config({ // set true if want see , when dynamically loaded debug: false }); $stateprovider .state('dashboards', { abstract: true, url: "/dashboards", templateurl: "views/common/content.html", }) .state('dashboards.dashboard_1', { url: "/dashboard_1", templateurl: "views/dashboard_1.html", //requireadlogin: true,
if uncomment requireadlogin, have infinite loop. if comment works again without authentication need.
so maybe state provider doesnt support , forced use route provider?
Comments
Post a Comment