Skip to content

Commit 7e0eca9

Browse files
committed
fix(annotations): Add missing inject annotation to the DirectiveController
Without this annotation, the minified code will not work properly. Reported by @mattlewis92 Closes #271
1 parent b88f53f commit 7e0eca9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/datetimepicker.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
function DatetimepickerDirective(defaultConfig, configurationValidator) {
3434

35-
return {
35+
var directiveDefinition = {
3636
bindToController: false,
3737
controller: DirectiveController,
3838
controllerAs: 'dateTimePickerController',
@@ -46,6 +46,8 @@
4646
templateUrl: 'templates/datetimepicker.html'
4747
};
4848

49+
DirectiveController.$inject = ['$scope', '$element', '$attrs'];
50+
4951
function DirectiveController($scope, $element, $attrs) {
5052
// Configuration
5153
var ngModelController = $element.controller('ngModel');
@@ -425,6 +427,8 @@
425427
}
426428
}
427429
}
430+
431+
return directiveDefinition;
428432
}
429433

430434
function DateTimePickerConfigProvider() {

0 commit comments

Comments
 (0)