Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New WebUI: Update angular and angular-route and add workaround to be compatible #1813

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions javascript/new-src/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"license": "GPL",
"private": true,
"dependencies": {
"angular": "~1.3.14",
"angular": "~1.8.3",
"bootstrap": "~3.3.1",
"angular-route": "~1.3.14"
"angular-route": "~1.8.3"
},
"exportsOverride": {
"angular": {
Expand Down
4 changes: 2 additions & 2 deletions javascript/new-src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"license": "GPL-2.0+",
"repository": "OpenLightingProject/ola",
"devDependencies": {
"olp-javascript-style": "OpenLightingProject/javascript-style",
"grunt": "~0.4.5",
"grunt-bower-task": "^0.4.0",
"grunt-contrib-cssmin": "^0.11.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-jscs": "^1.8.0"
"grunt-jscs": "^1.8.0",
"olp-javascript-style": "OpenLightingProject/javascript-style"
}
}
9 changes: 9 additions & 0 deletions javascript/new-src/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
/* global angular */
var ola = angular.module('olaApp', ['ngRoute']);

// AngularJS 1.6 now uses an '!' as the default hashPrefix, breaking
// our routes. Following lines revert the default to the previous empty
// string.
Comment on lines +23 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could also add a note saying given this webpage is only used internally, there is no benefit in the web crawler changes.

We could possibly add a TODO to update our URLs to remove this change, but maybe that's not necessary if we're rewriting to a new framework in future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this might be useful but since AngularJS (= 1.x) is a dead end, we won't bother for now

// See https://docs.angularjs.org/guide/migration#commit-aa077e8
ola.config(['$locationProvider', function($locationProvider) {
'use strict';
$locationProvider.hashPrefix('');
}]);

ola.config(['$routeProvider',
function($routeProvider) {
'use strict';
Expand Down
2 changes: 1 addition & 1 deletion olad/www/new/css/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading