Skip to content

Commit

Permalink
Merged PR 534018: [Angular Wrapper]: Update Demo App Angular version …
Browse files Browse the repository at this point in the history
…to 16

- Updated Demo Angular application to Angular version 16.

Changes:
1.  `topromise()` method has been deprecated in rxjs v7 and Replaced with `lastValueFrom`.
Reference: https://rxjs.dev/deprecations/to-promise

Related work items: #299175, #1355405, #1355407, #1356379
  • Loading branch information
KotanaSai21 committed Mar 27, 2024
1 parent a64b5f5 commit 3cae4cb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Angular/demo/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@
}
}
}
},
"defaultProject": "powerbi-client-angular-demo"
}
}
22 changes: 11 additions & 11 deletions Angular/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
"dependencies": {
"powerbi-client-angular": "^3.0.5",
"powerbi-report-authoring": "^1.1.1",
"rxjs": "~6.6.0",
"tslib": "^2.1.0"
"rxjs": "~7.8.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.8",
"@angular/cli": "~13.3.8",
"@angular/common": "^13.3.11",
"@angular/compiler": "~13.3.11",
"@angular/compiler-cli": "~13.3.11",
"@angular/core": "^13.3.11",
"@angular/platform-browser": "~13.3.11",
"@angular/platform-browser-dynamic": "~13.3.11",
"@angular-devkit/build-angular": "^16.2.12",
"@angular/cli": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/compiler-cli": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@types/node": "^12.11.1",
"typescript": "~4.6.4"
"typescript": "^5.1.3"
}
}
3 changes: 2 additions & 1 deletion Angular/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IReportEmbedConfiguration, models, Page, Report, service, Embed } from
import { PowerBIReportEmbedComponent } from 'powerbi-client-angular';
import { IHttpPostMessageResponse } from 'http-post-message';
import 'powerbi-report-authoring';
import { lastValueFrom } from 'rxjs';

import { reportUrl } from '../public/constants';
import { HttpService } from './services/http.service';
Expand Down Expand Up @@ -87,7 +88,7 @@ export class AppComponent {

// Get the embed config from the service and set the reportConfigResponse
try {
reportConfigResponse = await this.httpService.getEmbedConfig(reportUrl).toPromise();
reportConfigResponse = await lastValueFrom(this.httpService.getEmbedConfig(reportUrl));
} catch (error: any) {
this.displayMessage = `Failed to fetch config for report. Status: ${error.status} ${error.statusText}`;
console.error(this.displayMessage);
Expand Down
2 changes: 1 addition & 1 deletion Angular/demo/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"target": "ES2022",
"module": "es2020",
"lib": [
"es2018",
Expand Down

0 comments on commit 3cae4cb

Please sign in to comment.