Skip to content

Commit 513753c

Browse files
committed
Fix for ES6 class controllers in Firefox 52 ESR
Fixes error "class constructors must be invoked with |new|" See angular/angular.js#14240
1 parent 17d07a1 commit 513753c

File tree

18 files changed

+19
-0
lines changed

18 files changed

+19
-0
lines changed

UI/web/ngMango/components/dataPointTagSelect/dataPointTagSelect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ define(['angular', 'require'], function(angular, require) {
2424
**/
2525

2626
class DataPointTagSelectController {
27+
static get $$ngIsClass() { return true; }
2728
static get $inject() { return ['maDataPointTags']; }
2829

2930
constructor(maDataPointTags) {

UI/web/ngMango/components/eventAudio/eventAudio.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ define(['angular', 'require'], function(angular, require) {
2121
const localStorageKey = 'eventAudioPlayerId';
2222

2323
class EventAudioController {
24+
static get $$ngIsClass() { return true; }
2425
static get $inject() { return ['maEvents', '$scope', '$window', 'localStorageService', 'maUtil']; }
2526

2627
constructor(maEvents, $scope, $window, localStorageService, maUtil) {

UI/web/ngMango/components/eventHandlerEditor/eventHandlerEditor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ define(['angular', 'require'], function(angular, require) {
1515

1616
const $inject = Object.freeze(['maEventHandler', '$q', 'maDialogHelper', '$scope', '$window', 'maTranslate']);
1717
class EventHandlerEditorController {
18+
static get $$ngIsClass() { return true; }
1819
static get $inject() { return $inject; }
1920

2021
constructor(maEventHandler, $q, maDialogHelper, $scope, $window, maTranslate) {

UI/web/ngMango/components/getService/getService.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['angular'], function(angular) {
77
'use strict';
88

99
class GetServiceController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject () {
1112
return ['$injector'];
1213
}

UI/web/ngMango/components/imageSlider/imageSlider.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['angular', 'require'], function(angular, require) {
77
'use strict';
88

99
class ImageSliderController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject() {
1112
return ['$interval'];
1213
}

UI/web/ngMango/components/jsonStoreEditor/jsonStoreEditor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ define(['angular', 'require'], function(angular, require) {
1515

1616
const $inject = Object.freeze(['maJsonStore', '$q', 'maDialogHelper', '$scope', '$window', 'maTranslate']);
1717
class JsonStoreEditorController {
18+
static get $$ngIsClass() { return true; }
1819
static get $inject() { return $inject; }
1920

2021
constructor(maJsonStore, $q, maDialogHelper, $scope, $window, maTranslate) {

UI/web/ngMango/components/jsonStoreTable/jsonStoreTable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ define(['angular', 'require'], function(angular, require) {
1515

1616
const $inject = Object.freeze(['maJsonStore', '$q', '$filter', '$injector', '$window', 'maTranslate', '$scope']);
1717
class JsonStoreTableController {
18+
static get $$ngIsClass() { return true; }
1819
static get $inject() { return $inject; }
1920

2021
constructor(maJsonStore, $q, $filter, $injector, $window, maTranslate, $scope) {

UI/web/ngMango/components/pointEventDetector/pointEventDetector.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['angular'], function(angular) {
77
'use strict';
88

99
class PointEventDetectorController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject () {
1112
return ['maEventDetector'];
1213
}

UI/web/ngMango/components/userAuthTokens/userAuthTokens.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ define(['angular', 'require', 'moment-timezone'], function(angular, require, mom
1818
*/
1919

2020
class UserAuthTokensController {
21+
static get $$ngIsClass() { return true; }
2122
static get $inject() {
2223
return ['maUser', '$element', 'maDialogHelper'];
2324
}

UI/web/ngMango/directives/eventsTable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ function eventsTable(Events, UserNotes, $mdMedia, $injector, $sce, mangoDateForm
8484

8585
const $inject = Object.freeze(['$scope', '$attrs', '$element']);
8686
class EventsTableController {
87+
static get $$ngIsClass() { return true; }
8788
static get $inject() { return $inject; }
8889

8990
constructor($scope, $attrs, $element) {

UI/web/ngMango/directives/jsonModel.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ define(['angular'], function(angular) {
77
'use strict';
88

99
class JsonModelController {
10+
static get $$ngIsClass() { return true; }
11+
1012
constructor() {
1113
this.pretty = 4;
1214
}

UI/web/ngMango/directives/plotly.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ define(['angular'], function(angular) {
2020
**/
2121

2222
class PlotlyController {
23+
static get $$ngIsClass() { return true; }
2324
static get $inject() { return ['$scope', '$element', 'maRequireQ']; }
2425

2526
constructor($scope, $element, maRequireQ) {

UI/web/ngMango/directives/scaleTo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['angular'], function(angular) {
77
'use strict';
88

99
class ScaleToController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject() { return ['$scope', '$element', '$window', '$timeout', '$interval']; }
1112
constructor($scope, $element, $window, $timeout, $interval) {
1213
this.$scope = $scope;

UI/web/ui/components/eventHandlerPage/eventHandlerPage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define(['angular', 'require'], function(angular, require) {
88

99
const $inject = Object.freeze(['maEventHandler', '$state']);
1010
class EventHandlerPageController {
11+
static get $$ngIsClass() { return true; }
1112
static get $inject() { return $inject; }
1213

1314
constructor(maEventHandler, $state) {

UI/web/ui/components/forgotPassword/forgotPassword.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['require'], function(require) {
77
'use strict';
88

99
class ForgotPasswordController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject() { return ['maUser', '$stateParams', 'maDialogHelper', '$state']; }
1112

1213
constructor(maUser, $stateParams, maDialogHelper, $state) {

UI/web/ui/components/resetPassword/resetPassword.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['require'], function(require) {
77
'use strict';
88

99
class ResetPasswordController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject() { return ['maUser', '$state', '$window', '$stateParams', '$timeout', 'maDialogHelper']; }
1112

1213
constructor(maUser, $state, $window, $stateParams, $timeout, maDialogHelper) {

UI/web/ui/components/uiSettingsPage/uiSettingsPage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define(['angular', 'require'], function(angular, require) {
77
'use strict';
88

99
class UiSettingsPageController {
10+
static get $$ngIsClass() { return true; }
1011
static get $inject() { return ['maUiSettings', '$scope', '$window', 'maTranslate', 'maDialogHelper']; }
1112
constructor(maUiSettings, $scope, $window, maTranslate, maDialogHelper) {
1213
this.uiSettings = maUiSettings;

UI/web/ui/directives/stateParams/stateParams.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function stateParams($stateParams, $state, $timeout) {
1111

1212
const $inject = ['$scope'];
1313
class StateParamsController {
14+
static get $$ngIsClass() { return true; }
1415
static get $inject() { return $inject; }
1516

1617
constructor($scope) {

0 commit comments

Comments
 (0)