Angular is doing the POST for you so you do not need to set it on your HTML Form. So remove this action="/sign" method="post"
, it is making your page to POST the data and therefore to refresh:
<form class="form-inline" role="form">
Your "submit button" needs to call the angular $http
POST method declared in your controller, so it needs to do something like this:
<button type="button" class="btn btn-primary" ng-click="processForm()">Sign Up / Sign in</button>
Additionally you need to inject the $http
service in your controller like this:
angular.module('SignCtrl', []).controller('SignController', function($scope, $http) {
...
Moreover
$scope.formData = {}
will always be empty as you never set it to anything.
If you want to associate this object with your form your need to use ng-model
attribute like this:
<input type="email" name="email" ng-model="formData.email" class="form-control" id="email" placeholder="Your Email">
<input type="password" name="password" ng-model="formData.password" class="form-control" id="password" placeholder="Your Password">