Skip to content

Instantly share code, notes, and snippets.

@uglow
Created January 13, 2017 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uglow/078cae3b3a66ae728e1defabeb20fbd4 to your computer and use it in GitHub Desktop.
Save uglow/078cae3b3a66ae728e1defabeb20fbd4 to your computer and use it in GitHub Desktop.
import angular from 'angular';
import myServiceMod from './myService';
const mod = angular.module('company.module.component', [myServiceMod]);
// The wiring of the component is INSIDE this file.
// The dependencies are explicit (yet still injectable)
// The component can be re-used easily!
mod.component('myComponent', {
bindings: {...},
controller: ['myService', function(myService) {
...
}];
});
export mod.name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment