{
  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();

    }
  ]);

}

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

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

--- 
+++ 
@@ -1,25 +1,11 @@
 {
+  class UsersService {
+    create(user) {
+      console.log('CREATED!');
+      console.log(user);
+    }
+  }
+
   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();
-
-    }
-  ]);
-
+  .service('UsersService', UsersService);
 }
Make a POST request to create a user.
