<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>

CC BY-SA 3.0
2014-10-08T10:52:17.263Z
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.
Bryan Redeagle
CC BY-SA 3.0
2014-10-08T09:30:54.953Z
2014-10-08T09:30:54.953Z
Jamie O'Hanlon
<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>

<form><registration>
Craft front-end forms not working with Angularjs app
# 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 {{ currentUser.friendlyName }}
        logout

    {% else %}

    
        

        Username
        

        Password
        

        

        {% if errorMessage is defined %}
            {{ errorMessage }}
        {% endif %}
        Please login or register
    

    {% 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.  

---

