javascript - converting routing from state provider to route provider -


i have following code on config.js works fine:

function config($stateprovider, $urlrouterprovider,     $oclazyloadprovider, idleprovider, keepaliveprovider,     adalauthenticationserviceprovider, $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: true     });      $stateprovider          .state('dashboards', {             abstract: true,             url: "/dashboards",             templateurl: "views/common/content.html",         })         .state('dashboards.dashboard_1', {             url: "/dashboard_1",             templateurl: "views/dashboard_1.html",             resolve: {                 loadplugin: function ($oclazyload) {                     return $oclazyload.load([                         {                              serie: true,                             name: 'angular-flot',                             files: [ 'js/plugins/flot/jquery.flot.js', 'js/plugins/flot/jquery.flot.time.js', 'js/plugins/flot/jquery.flot.tooltip.min.js', 'js/plugins/flot/jquery.flot.spline.js', 'js/plugins/flot/jquery.flot.resize.js', 'js/plugins/flot/jquery.flot.pie.js', 'js/plugins/flot/curvedlines.js', 'js/plugins/flot/angular-flot.js', ]                         },                         {                             name: 'angles',                             files: ['js/plugins/chartjs/angles.js', 'js/plugins/chartjs/chart.min.js']                         },                         {                             name: 'angular-peity',                             files: ['js/plugins/peity/jquery.peity.min.js', 'js/plugins/peity/angular-peity.js']                         }                     ]);                 }             }         }) 

when try convert use route provider this:

function config($stateprovider, $urlrouterprovider,     $oclazyloadprovider, idleprovider, keepaliveprovider,     adalauthenticationserviceprovider, $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: true     });      $urlrouterprovider.when("/dashboard_1", {         controller: "mainctrl",         templateurl: "/views/dashboard_1.html",         resolve: {                         loadplugin: function ($oclazyload) {                             return $oclazyload.load([                                 {                                      serie: true,                                     name: 'angular-flot',                                     files: [ 'js/plugins/flot/jquery.flot.js', 'js/plugins/flot/jquery.flot.time.js', 'js/plugins/flot/jquery.flot.tooltip.min.js', 'js/plugins/flot/jquery.flot.spline.js', 'js/plugins/flot/jquery.flot.resize.js', 'js/plugins/flot/jquery.flot.pie.js', 'js/plugins/flot/curvedlines.js', 'js/plugins/flot/angular-flot.js', ]                                 },                                 {                                     name: 'angles',                                     files: ['js/plugins/chartjs/angles.js', 'js/plugins/chartjs/chart.min.js']                                 },                                 {                                     name: 'angular-peity',                                     files: ['js/plugins/peity/jquery.peity.min.js', 'js/plugins/peity/angular-peity.js']                                 }                             ]);                         }                     }     }).otherwise({ redirectto: "/dashboard_1" }); 

app.js

(function () {     angular.module('inspinia', [         'ui.router',                    // routing         'oc.lazyload',                  // oclazyload         'ui.bootstrap',                 // ui bootstrap         'pascalprecht.translate',       // angular translate         'ngidle',                       // idle timer         'adalangular',                  // adal js angular         'ngroute'                       // routing     ]) })(); 

i blank page, no errors on console. stuck , without ideas look

http://screencast.com/t/caoyjmzxbgd


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -