Skip to content

Instantly share code, notes, and snippets.

@samwx
Created November 19, 2017 17:42
Show Gist options
  • Save samwx/7005522b25e4351b4d367735669b78fd to your computer and use it in GitHub Desktop.
Save samwx/7005522b25e4351b4d367735669b78fd to your computer and use it in GitHub Desktop.
angularjs module distribution
(function(angular){
angular.module('blip.components', [])
.component('component1', {
template: '<span>{{ $ctrl.name }}</span>',
bindings: {
name: '@',
}
})
.component('component2', {
template: '<span>{{ $ctrl.name }} 2</span>',
bindings: {
name: '@',
}
});
})(angular);
/**
Usage:
import angular from 'angular';
import 'blipComponents';
angular.module('app', ['blip.components']);
angular.bootstrap(document, ['app']);
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment