title: Page redirect in Angular/MVC app
body: <p>I have a button in my view that I need to redirect me to a page to edit the element it is associated with.</p>
  
  <p>Here is the button - pretty straight forward.</p>
  
  <pre><code>&lt;button type="button" class="btn btn-default" ng-click="edit(x.TemplateStepID)"&gt;&lt;span class="glyphicon glyphicon-edit"&gt;&lt;/span&gt;&lt;/button&gt;
  </code></pre>
  
  <p>Here is the function in my angular controller.</p>
  
  <pre><code>$scope.edit = function (e) {                
              TemplateService.editTemplateStep(e)
              .success(function (data) {
  
              })
              .error(function (error) {
  
              });
          };
  </code></pre>
  
  <p>and the function in the app.factory:</p>
  
  <pre><code>TemplateService.editTemplateStep = function (stepID) {
              alert(stepID);                
              return $http.get('@Url.Action("EditTemplateStep", "TemplateStep")', stepID);
          }
  </code></pre>
  
  <p>Now I can get the data to pass all the way to the editTemplateStep function. But I cannot figure out how to get that info (stepID) to get passed to an MVC controller function so I can redirect to the edit page of the element the button is associated with.</p>
  
  <p>New to Angular and MVC for that matter.  Any help will be greatly appreciated.</p>