-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Cannot export or import clases when using es6.
Exporting class:
export class authRestService
{
constructor($resource, env) {
this.$resource = $resource;
this.env = env;
}
}
Importing class and extending:
import {authRestService} from './authrest-service';
(function () {
'use strict';
class Auth extends authRestService {
constructor($resource, env) {
super($resource, env);
}
get() {
return 'Auth';
}
}
/**
* @ngdoc service
* @name components.service:Auth
*
* @description
*
*/
angular
.module('components')
.service('Auth', Auth);
}());
i get the following error on the console,
authrest-service.js:3 Uncaught ReferenceError: exports is not defined(…)(anonymous function)
auth-service.js:11 Uncaught ReferenceError: require is not defined(…)(anonymous function)
Reactions are currently unavailable