Upgrade angular from 1.4.14 to 1.7.9 (#2955)

* successfully upgraded to v1.6 with $compileProvider.preAssignBindingsEnabled(true)
* removed $compileProvider.preAssignBindingsEnabled(true), wrapped constructors for plot and chart inside onInit function
Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
Joel McKinnon 2020-04-21 15:34:12 -07:00 committed by GitHub
parent 87bf94fe0a
commit 6d3cd2c699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 43 deletions

View File

@ -5,7 +5,7 @@
"dependencies": {},
"devDependencies": {
"acorn": "6.2.0",
"angular": "1.4.14",
"angular": "1.7.9",
"angular-route": "1.4.14",
"babel-eslint": "8.2.6",
"comma-separated-values": "^3.6.4",

View File

@ -87,6 +87,11 @@ define([
bootstrapper
);
// Override of angular1.6 ! hashPrefix
app.config(['$locationProvider', function ($locationProvider) {
$locationProvider.hashPrefix('');
}]);
// Apply logging levels; this must be done now, before the
// first log statement.
new LogLevel(logLevel).configure(app, $log);

View File

@ -54,6 +54,7 @@ function (
* @constructor
*/
function MCTChartController($scope) {
this.$onInit = () => {
this.$scope = $scope;
this.isDestroyed = false;
this.lines = [];
@ -76,6 +77,7 @@ function (
this.$scope.$watch('rectangles', this.scheduleDraw);
this.config.series.forEach(this.onSeriesAdd, this);
}
}
eventHelpers.extend(MCTChartController.prototype);

View File

@ -34,6 +34,7 @@ define([
* values near the cursor.
*/
function MCTPlotController($scope, $element, $window) {
this.$onInit = () => {
this.$scope = $scope;
this.$scope.config = this.config;
this.$scope.plot = this;
@ -54,6 +55,7 @@ define([
this.initialize();
}
}
MCTPlotController.$inject = ['$scope', '$element', '$window'];

View File

@ -114,6 +114,7 @@ define([
}
function MCTTicksController($scope, $element) {
this.$onInit = () => {
this.$scope = $scope;
this.$element = $element;
@ -124,6 +125,7 @@ define([
this.listenTo(this.$scope, '$destroy', this.stopListening, this);
this.updateTicks();
}
}
MCTTicksController.$inject = ['$scope', '$element'];