Commit 45f09724 authored by Robert Knight's avatar Robert Knight

Simplify `<excerpt>` component exports

Just export the `<excerpt>` component definition instead of both the
definition (which includes the controller) and the controller itself.
parent 794960d1
...@@ -140,7 +140,7 @@ module.exports = angular.module('h', [ ...@@ -140,7 +140,7 @@ module.exports = angular.module('h', [
.component('annotationShareDialog', require('./components/annotation-share-dialog')) .component('annotationShareDialog', require('./components/annotation-share-dialog'))
.component('annotationThread', require('./components/annotation-thread')) .component('annotationThread', require('./components/annotation-thread'))
.component('dropdownMenuBtn', require('./components/dropdown-menu-btn')) .component('dropdownMenuBtn', require('./components/dropdown-menu-btn'))
.component('excerpt', require('./components/excerpt').component) .component('excerpt', require('./components/excerpt'))
.component('groupList', require('./components/group-list')) .component('groupList', require('./components/group-list'))
.component('helpLink', require('./components/help-link')) .component('helpLink', require('./components/help-link'))
.component('helpPanel', require('./components/help-panel')) .component('helpPanel', require('./components/help-panel'))
......
...@@ -131,7 +131,7 @@ function ExcerptController($element, $scope, ExcerptOverflowMonitor) { ...@@ -131,7 +131,7 @@ function ExcerptController($element, $scope, ExcerptOverflowMonitor) {
* specified number of lines and provides controls for expanding * specified number of lines and provides controls for expanding
* and collapsing the resulting truncated element. * and collapsing the resulting truncated element.
*/ */
var component = { module.exports = {
controller: ExcerptController, controller: ExcerptController,
controllerAs: 'vm', controllerAs: 'vm',
bindings: { bindings: {
...@@ -177,8 +177,3 @@ var component = { ...@@ -177,8 +177,3 @@ var component = {
transclude: true, transclude: true,
template: require('../templates/excerpt.html'), template: require('../templates/excerpt.html'),
}; };
module.exports = {
component: component,
Controller: ExcerptController,
};
...@@ -25,7 +25,7 @@ describe('excerpt', function () { ...@@ -25,7 +25,7 @@ describe('excerpt', function () {
before(function () { before(function () {
angular.module('app', []) angular.module('app', [])
.component('excerpt', excerpt.component); .component('excerpt', excerpt);
}); });
beforeEach(function () { beforeEach(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment