Answers.Body: <p>Okay so I figured it out. Turns out a form won't submit in an Angular app if it doesn't have an action specified.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T10:52:17.263Z
Answers.Text: By omitting the action attribute, all a form does is submit itself to the same url it resides on. As a workaround, you can use `craft.request.url` as the action.
Answers.UserDisplayName: Bryan Redeagle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T09:30:54.953Z
Answers.LastActivityDate: 2014-10-08T09:30:54.953Z
Answers.UserDisplayName: Jamie O'Hanlon
Body: <p>I'm making a site with Craft CMS/Angularjs. I'm using angular to filter and display entries on the index page and it's working good so far except for one thing. The login/register/entry form's all don't function at all. If I remove ng-app from the html tag they work just fine so it's definitely angular that's causing this issue. </p>
  
  <p>Here's my login form on the main page:</p>
  
  <pre><code>{% if currentUser %}
          You are logged in as &lt;strong&gt;{{ currentUser.friendlyName }}&lt;/strong&gt;
          &lt;a href="/logout"&gt;logout&lt;/a&gt;
  
      {% else %}
  
      &lt;form method="post" action="" accept-charset="UTF-8"&gt;
          &lt;input type="hidden" name="action" value="users/login"&gt;
  
          &lt;h3&gt;&lt;label for="loginName"&gt;Username&lt;/label&gt;&lt;/h3&gt;
          &lt;input id="loginName" type="text" name="loginName"&gt;
  
          &lt;h3&gt;&lt;label for="password"&gt;Password&lt;/label&gt;&lt;/h3&gt;
          &lt;input id="password" type="password" name="password"&gt;
  
          &lt;input type="submit" value="Login"&gt;
  
          {% if errorMessage is defined %}
              &lt;p&gt;{{ errorMessage }}&lt;/p&gt;
          {% endif %}
          &lt;p&gt;Please login or &lt;a href="/register"&gt;register&lt;/a&gt;&lt;/p&gt;
      &lt;/form&gt;
  
      {% endif %}
  </code></pre>
  
  <p>If anyone with experience using angular and craft together can chime in that'll be great.</p>
  
Tags: <form><registration>
Title: Craft front-end forms not working with Angularjs app
ThreadText: # Craft front-end forms not working with Angularjs app
  
  (Asked by: username_0 on 2014-10-08)
  
  I'm making a site with Craft CMS/Angularjs. I'm using angular to filter and display entries on the index page and it's working good so far except for one thing. The login/register/entry form's all don't function at all. If I remove ng-app from the html tag they work just fine so it's definitely angular that's causing this issue.
  
  Here's my login form on the main page:
  
  ```
  {% if currentUser %}
          You are logged in as <strong>{{ currentUser.friendlyName }}</strong>
          <a href="/logout">logout</a>
  
      {% else %}
  
      <form method="post" action="" accept-charset="UTF-8">
          <input type="hidden" name="action" value="users/login">
  
          <h3><label for="loginName">Username</label></h3>
          <input id="loginName" type="text" name="loginName">
  
          <h3><label for="password">Password</label></h3>
          <input id="password" type="password" name="password">
  
          <input type="submit" value="Login">
  
          {% if errorMessage is defined %}
              <p>{{ errorMessage }}</p>
          {% endif %}
          <p>Please login or <a href="/register">register</a></p>
      </form>
  
      {% endif %}
  
  ```
  
  If anyone with experience using angular and craft together can chime in that'll be great.
  
  **Tags:** form, registration
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2014-10-08. Score: 2 | Accepted answer
  
  Okay so I figured it out. Turns out a form won't submit in an Angular app if it doesn't have an action specified.
  
  > **Comments:**
  > **username_1**: By omitting the action attribute, all a form does is submit itself to the same url it resides on. As a workaround, you can use `craft.request.url` as the action.  
  
  ---
  
  