Skip to content

Commit 8b77bb1

Browse files
committed
Update to Angular 11
1 parent 3e6dfb2 commit 8b77bb1

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

src/AlbumViewerAngular/package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
},
1717
"private": true,
1818
"dependencies": {
19-
"@angular/animations": "^10.2.4",
20-
"@angular/common": "^10.2.4",
21-
"@angular/compiler": "^10.2.4",
22-
"@angular/core": "^10.2.4",
23-
"@angular/forms": "^10.2.4",
24-
"@angular/localize": "^10.2.4",
25-
"@angular/platform-browser": "^10.2.4",
26-
"@angular/platform-browser-dynamic": "^10.2.4",
27-
"@angular/router": "^10.2.4",
19+
"@angular/animations": "^11.1.2",
20+
"@angular/common": "^11.1.2",
21+
"@angular/compiler": "^11.1.2",
22+
"@angular/core": "^11.1.2",
23+
"@angular/forms": "^11.1.2",
24+
"@angular/localize": "^11.1.2",
25+
"@angular/platform-browser": "^11.1.2",
26+
"@angular/platform-browser-dynamic": "^11.1.2",
27+
"@angular/router": "^11.1.2",
2828
"bootstrap": "^4.4.1",
2929
"core-js": "^2.5.4",
3030
"font-awesome": "^4.7.0",
@@ -37,16 +37,16 @@
3737
"zone.js": "~0.10.2"
3838
},
3939
"devDependencies": {
40-
"@angular-devkit/build-angular": "~0.1002.2",
41-
"@angular/cli": "~10.2.2",
42-
"@angular/compiler-cli": "^10.2.4",
43-
"@angular/language-service": "^10.2.4",
44-
"@types/jasmine": "~2.8.8",
40+
"@angular-devkit/build-angular": "~0.1101.4",
41+
"@angular/cli": "~11.1.4",
42+
"@angular/compiler-cli": "^11.1.2",
43+
"@angular/language-service": "^11.1.2",
44+
"@types/jasmine": "~3.6.0",
4545
"@types/jasminewd2": "~2.0.3",
4646
"@types/node": "^12.11.1",
47-
"jasmine-core": "~3.5.0",
47+
"jasmine-core": "~3.6.0",
4848
"jasmine-spec-reporter": "~5.0.0",
49-
"karma": "~5.0.0",
49+
"karma": "~5.2.3",
5050
"karma-chrome-launcher": "~3.1.0",
5151
"karma-coverage-istanbul-reporter": "~3.0.2",
5252
"karma-jasmine": "~4.0.0",

src/AlbumViewerAngular/src/app/albums/albumList.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class AlbumList implements OnInit {
6767
this.albumList = albums;
6868
this.busy = false;
6969

70-
// reset scroll position of the list
70+
// reset to last scroll position of the list
7171
setTimeout(()=> $("#MainView").scrollTop(this.albumService.listScrollPos), 100);
7272
}, err => {
7373
if (!err.message)
@@ -79,7 +79,9 @@ export class AlbumList implements OnInit {
7979
}
8080

8181
albumClick(album: Album) {
82+
// save scroll position before navigation
8283
this.albumService.listScrollPos = $("#MainView").scrollTop();
84+
8385
this.router.navigate(['/album', album.Id]);
8486
}
8587

src/AlbumViewerAngular/src/app/app.module.ts

-10
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ import {AlbumEditor} from './albums/albumEditor';
1818
import {ArtistList} from './artists/artistList';
1919
import {ArtistDisplay} from './artists/artistDisplay';
2020

21-
// services
22-
import {Album, Artist, Track} from './business/entities';
23-
import {AlbumService} from './albums/albumService';
24-
import {ArtistService} from './artists/artistService';
25-
import {AppConfiguration} from './business/appConfiguration';
26-
import {UserInfo} from "./business/userInfo";
27-
2821
import {LocationStrategy, HashLocationStrategy} from '@angular/common';
2922
import {AlbumSongList} from "./albums/albumSongList";
3023

@@ -39,9 +32,7 @@ import { OptionsComponent } from './options/options';
3932
/* Custom Components or overrides */
4033
import {HttpRequestInterceptor} from './business/httpRequestInterceptor'
4134
import { FocusDirective } from './common/focusDirective';
42-
import { NgbTypeaheadModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';
4335
import {ToastrModule} from "ngx-toastr";
44-
import {cachingDisabled} from "@angular-devkit/build-angular/src/utils/environment-options";
4536
import {ModalModule} from "ngx-bootstrap/modal";
4637
import {TypeaheadModule} from "ngx-bootstrap/typeahead";
4738

@@ -90,7 +81,6 @@ import {TypeaheadModule} from "ngx-bootstrap/typeahead";
9081
],
9182
// services, pipes and providers
9283
providers: [
93-
//Album, Artist, Track
9484

9585
// make sure you use this for Hash Urls rather than HTML 5 routing
9686
//{ provide: LocationStrategy, useClass: HashLocationStrategy },

src/AlbumViewerAngular/src/app/artists/artistDisplay.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import {ErrorInfo} from "../common/errorDisplay";
99
import { ArtistEditor } from "./artistEditor";
1010
import {slideIn} from "../common/animations";
1111

12-
import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap';
13-
14-
15-
1612
@Component({
1713
//moduleId: module.id,
1814
selector: 'artist-display',
@@ -34,8 +30,7 @@ export class ArtistDisplay implements OnInit {
3430
private artistService: ArtistService,
3531
private config: AppConfiguration,
3632
private router: Router,
37-
private user: UserInfo,
38-
private modalService: NgbModal) {
33+
private user: UserInfo) {
3934
}
4035

4136

0 commit comments

Comments
 (0)