From a22de1964cc4e2f960ed77664f16455e7a8a618a Mon Sep 17 00:00:00 2001 From: Tim Buckley Date: Mon, 4 Jan 2016 17:03:03 -0700 Subject: [PATCH] Add missing DI annotations and enable strictDi. This adds missing `@ngInject` annotations to 2 directives and enables angular's strictDi mode. This patch should fix bulids produced with `gulp prod` that were unusable due to DI errors. Change-Id: Ib3c8810c24afb3c859029d2f8eaf9044416b6fa3 --- app/js/directives/tempest-summary.js | 4 ++++ app/js/directives/timeline-details.js | 4 ++++ app/js/main.js | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/js/directives/tempest-summary.js b/app/js/directives/tempest-summary.js index 18a16b1..a9e03b8 100644 --- a/app/js/directives/tempest-summary.js +++ b/app/js/directives/tempest-summary.js @@ -6,6 +6,10 @@ var directivesModule = require('./_index.js'); * @ngInject */ function tempestSummary() { + + /** + * @ngInject + */ var controller = function($scope, $attrs, datasetService) { $scope.$watch('dataset', function(dataset) { var stats = dataset.stats; diff --git a/app/js/directives/timeline-details.js b/app/js/directives/timeline-details.js index 0b86524..02a23c5 100644 --- a/app/js/directives/timeline-details.js +++ b/app/js/directives/timeline-details.js @@ -6,6 +6,10 @@ var directivesModule = require('./_index.js'); * @ngInject */ function timelineDetails() { + + /** + * @ngInject + */ var controller = function($scope) { $scope.item = null; diff --git a/app/js/main.js b/app/js/main.js index 0b5e003..c5ee1cd 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -33,4 +33,6 @@ angular.module('app').config(onConfig); var onRun = require('./on_run'); angular.module('app').run(require('./on_run')); -angular.bootstrap(document, ['app']); +angular.bootstrap(document, ['app'], { + strictDi: true +});