1

I have below code

code to render /result content whenever the defaultview function is called using the $route service

angular.module('myapp').controller
    ('ResultController',['$route',function ($route){ this.defaultview=function(){$routes._ _ _ _  ('/result');};}

What will be the value in last line dash area?Any suggestions?

1 Answers1

0

You need to use $location if you are using ngRouter. i.e.

In your case, you can use

$location.path('/result');
Manish Singh
  • 518
  • 3
  • 13