{
  class UsersService {
    create(user) {
      console.log('CREATED!');
      console.log(user);
    }
  }

  angular.module('meganote.users')
  .service('UsersService', UsersService);
}

{
  angular.module('meganote.users')
  .service('UsersService', [
    '$http',
    'API_BASE',
    ($http, API_BASE) => {

      class UsersService {
        create(user) {
          return $http.post(`${API_BASE}users`, {
            user,
          })
          .then(
            res => {
              console.log(res.data);
            }
          );
        }
      }
      return new UsersService();

    }
  ]);

}

Make a POST request to create a user.
Make a POST request to create a user.
