0

I have an html page that takes form input. Based on the form variables input into the form, I want to navigate to different URLs using AngularJS routing. Can anyone provide some information as to how I can do this?

  • Kindly, look at this stackoverflow Question http://stackoverflow.com/questions/11003916/angularjs-how-do-i-switch-views-from-a-controller-function . Hope it will help! – shobhit jain Aug 31 '16 at 06:06

1 Answers1

0

There can be multiple approaches to this. Two obvious choices are to use $routeProvider if you are using ngRoute for routing or $stateProvider if you use angular-ui-router. In both cases, the paradigm remains the same.

Essentially you can map your form date from $scope to the states/routes in your app.config. From there, you can pass the templateURLs and map them to whatever HTML page you want it to load.

Please reach out for further clarification . All the best.