angularjs - Unit test onEnter with ui-router -


i have state onenter block following. i'm trying redirect based on data.length.

  .state('home', {     url: '/',     data: {       title: 'home',     },     controller: 'homectrl home',     templateprovider: function($templatecache) {       return $templatecache.get('views/home.html');     },     onenter: function(data, $state) {);       if (data.length === 2) {         $state.go('profile');       }     }   }); 

how can unit-test piece of code?


Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -