Skip to content

Instantly share code, notes, and snippets.

@carlosrymer
Created July 30, 2017 16:07
Show Gist options
  • Save carlosrymer/cd71e7079dba943706326f4dc7257cd8 to your computer and use it in GitHub Desktop.
Save carlosrymer/cd71e7079dba943706326f4dc7257cd8 to your computer and use it in GitHub Desktop.
A sample Angular 1.x module written in ES6 using Webpack 3.
import angular from 'angular';
import ngRouteModuleName from 'angular-route';
import service1 from 'path/to/service/one';
import service2 from 'path/to/service/two';
import component1 from 'path/to/component/one';
import component2 from 'path/to/component/two';
import controller from './controller';
import configure from './configure';
const pageModule = angular.module('myModuleName', [
ngRouteModuleName,
service1.name,
service2.name,
component1.name,
component2.name
]);
pageModule
.controller(controller.name, controller)
.config(configure);
export default pageModule;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment