title: Angular Pass String to Function
body: <p>This seems like it should be easy to do, but I am not sure why this isn't working.  All I want to do is pass this string to the function.</p>
  
  <p>I've tried this.</p>
  
  <pre><code>&lt;form ng-submit="edit(type)" ng-init="type='debt'"&gt;
  </code></pre>
  
  <p>I've tried this as well.</p>
  
  <pre><code>&lt;div ng-controller="FormCtrl"&gt;      
  
    &lt;form ng-submit="edit('debt')"&gt;
          &lt;input type="submit" value="ADD"&gt;
    &lt;/form&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>and on the js side.</p>
  
  <pre><code>app.controller('FormCtrl', function ($scope, $cookies, $http){
  
      $scope.edit = function(typ){
      alert(typ);
      }
  
  });
  </code></pre>
  
  <p>All I want to do is alert out that word 'debt'.  All I get is undefined.</p>