Skip to content

Es6 + Webpack + Babel cannot make this work #30

@zambov

Description

@zambov

Hi all,

cannot make this work, i have all the time unkjnown provider.
Here is my webpack conf:

{
   test: /\.js$/,
   exclude: /(node_modules|bower_components)/,
   loader: 'ng-annotate!babel-loader?presets[]=es2015&presets[]=stage-2&compact=false'
},

Here is my controller:

/** @ngInject /
/

  • @author Trilogis developer
  • prova
  • This is a module generated with trilogis template module scaffolder
    */

class ProvaController {

constructor($log) {

    $log.debug('Instatiated the ProvaController');
    this.name = "ProvaController";
};

}

export default ProvaController;

But i've tried also:

/*
* @author Trilogis developer
* prova
* 
* This is a module generated with trilogis template module scaffolder
*/

class ProvaController {

    constructor($log) {
'ngInject';

        $log.debug('Instatiated the ProvaController');
        this.name = "ProvaController";
    };
}

export default ProvaController;

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions