export class RegisterComponent implements ng.IComponentOptions {
  static NAME:string = 'appRegister';
  template: any;
  controllerAs:string;
  controller;

  constructor() {
    this.template = require('./register.component.html');
    this.controllerAs = '$ctrl';
    this.controller = RegisterController;
  }
}

class RegisterController implements ng.IComponentController {
  static $inject = ['$http', '$state', '$httpParamSerializerJQLike'];
  title: string;
  user;
  emailUsed = false;

  constructor(
    private http: ng.IHttpService,
    private $state: ng.ui.IStateService,
    private httpParamSerializerJQLike: ng.IHttpParamSerializer
  ) {
    this.title = "Register Page";
    this.user = {};
  }

  register() {
    this.http.post(
      'http://localhost:8080/api/register',
      this.httpParamSerializerJQLike(this.user),
      {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
      }
    ).then(response => {
      console.log(response.data);

      if (response.data === 'email already used') {
        this.emailUsed = true;
        return;
      }

      this.$state.go('app.dashboard.student');
    })

  }
}
export class RegisterComponent implements ng.IComponentOptions {
  static NAME:string = 'appRegister';
  template: any;
  controllerAs:string;
  controller;

  constructor() {
    this.template = require('./register.component.html');
    this.controllerAs = '$ctrl';
    this.controller = RegisterController;
  }
}

class RegisterController implements ng.IComponentController {
  static $inject = ['$http', '$state'];
  title: string;
  user;
  emailUsed = false;

  constructor(private http: ng.IHttpService, private $state: ng.ui.IStateService) {
    this.title = "Register Page";
    this.user = {};
  }

  register() {
    this.http.post('http://localhost:8080/api/register', this.user, {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    }).then(response => {
      console.log(response.data);

      if (response.data === 'email already used') {
        this.emailUsed = true;
        return;
      }

      this.$state.go('app.dashboard.student');
    })

  }
}
--- 
+++ 
@@ -12,22 +12,30 @@
 }
 
 class RegisterController implements ng.IComponentController {
-  static $inject = ['$http', '$state'];
+  static $inject = ['$http', '$state', '$httpParamSerializerJQLike'];
   title: string;
   user;
   emailUsed = false;
 
-  constructor(private http: ng.IHttpService, private $state: ng.ui.IStateService) {
+  constructor(
+    private http: ng.IHttpService,
+    private $state: ng.ui.IStateService,
+    private httpParamSerializerJQLike: ng.IHttpParamSerializer
+  ) {
     this.title = "Register Page";
     this.user = {};
   }
 
   register() {
-    this.http.post('http://localhost:8080/api/register', this.user, {
+    this.http.post(
+      'http://localhost:8080/api/register',
+      this.httpParamSerializerJQLike(this.user),
+      {
       headers: {
         'Content-Type': 'application/x-www-form-urlencoded'
       }
-    }).then(response => {
+      }
+    ).then(response => {
       console.log(response.data);
 
       if (response.data === 'email already used') {
Send data using jqaram in registration controller
