add angular-ui/ui-router; replace  with ; replace .when() with .state(); replace on('routeChangeStart') with on('stateChangeStart')