angular8

couldnt import fireStoreModule correctly in angular

[亡魂溺海] 提交于 2020-12-27 06:35:14
问题 I am getting this error while running the angular project This likely means that the library (@angular/fire/firestore) which declares AngularFirestore has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of theen processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be

how can i pass all localstorage values to response

假如想象 提交于 2020-12-15 06:52:29
问题 I wish to pass fullName, lastLogon, and RolePermissions as at the moment I'm only getting UserId Sorry I was unable to find an answer to this directly. dashboard.service.ts getUsersById(id): Observable<any> { return this.http.get<any>(`https://www.mywebsite.net/umbraco/api/UsersApi/GetUsersById/1${id}`, { headers: new HttpHeaders() .set('Authorization', this.bearer_token) }); } getTheUsersId(){ this.getUsersId(localStorage.UserId).subscribe((res) => { console.log(res); this.responseId = res;

how can i pass all localstorage values to response

落爺英雄遲暮 提交于 2020-12-15 06:51:29
问题 I wish to pass fullName, lastLogon, and RolePermissions as at the moment I'm only getting UserId Sorry I was unable to find an answer to this directly. dashboard.service.ts getUsersById(id): Observable<any> { return this.http.get<any>(`https://www.mywebsite.net/umbraco/api/UsersApi/GetUsersById/1${id}`, { headers: new HttpHeaders() .set('Authorization', this.bearer_token) }); } getTheUsersId(){ this.getUsersId(localStorage.UserId).subscribe((res) => { console.log(res); this.responseId = res;

how can i pass all localstorage values to response

寵の児 提交于 2020-12-15 06:51:17
问题 I wish to pass fullName, lastLogon, and RolePermissions as at the moment I'm only getting UserId Sorry I was unable to find an answer to this directly. dashboard.service.ts getUsersById(id): Observable<any> { return this.http.get<any>(`https://www.mywebsite.net/umbraco/api/UsersApi/GetUsersById/1${id}`, { headers: new HttpHeaders() .set('Authorization', this.bearer_token) }); } getTheUsersId(){ this.getUsersId(localStorage.UserId).subscribe((res) => { console.log(res); this.responseId = res;

Snackbar not working on Modal Table Angular Material

假装没事ソ 提交于 2020-12-15 06:04:47
问题 I have implemented a functionality of deletion and on successful completion I have to display a snackbar with the message received from backend. I am able to get the correct response but the snackbar is not accessible. I think the scope is different as it is mat-dialog table from where I am deleting a user. TS Code: @Component({ selector: 'app', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], }) export class AppComponent implements OnInit { constructor( public

Snackbar not working on Modal Table Angular Material

喜欢而已 提交于 2020-12-15 06:04:18
问题 I have implemented a functionality of deletion and on successful completion I have to display a snackbar with the message received from backend. I am able to get the correct response but the snackbar is not accessible. I think the scope is different as it is mat-dialog table from where I am deleting a user. TS Code: @Component({ selector: 'app', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], }) export class AppComponent implements OnInit { constructor( public

Logout User and Redirect User to Login on Token Expiration - Angular 8

我只是一个虾纸丫 提交于 2020-12-15 05:21:13
问题 I receive idToken and I am also getting the expiration time expTime in timestamp format eg: 1605803717 which basically expires in 1 day. I want to log the user out and redirect the user to login page if idToken expires. I have implemented a HTTPInterceptor as below: intercept( request: HttpRequest<any>, next: HttpHandler ): Observable<HttpEvent<any>> { this.token = JSON.parse(localStorage.getItem("getToken")); if (this.tokenExpired(this.token)) { Auth.signOut().then((res) => { this.authState

Angular 8 “ngIf” condition not working as expected

六眼飞鱼酱① 提交于 2020-12-15 04:22:47
问题 I have 3 divs based on my condition. Those divs have to appear, actually it is working as expected for the first time div a div b div c This is the condition I gave <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo!==3 && getInfo !== 5"></div> <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo==3"></div> <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo==5"></div> Initially when I load first page first div is working as expected, no issue there. But when I got to second page the second

Angular 8 “ngIf” condition not working as expected

依然范特西╮ 提交于 2020-12-15 04:19:19
问题 I have 3 divs based on my condition. Those divs have to appear, actually it is working as expected for the first time div a div b div c This is the condition I gave <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo!==3 && getInfo !== 5"></div> <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo==3"></div> <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo==5"></div> Initially when I load first page first div is working as expected, no issue there. But when I got to second page the second

Angular 8 “ngIf” condition not working as expected

女生的网名这么多〃 提交于 2020-12-15 04:17:05
问题 I have 3 divs based on my condition. Those divs have to appear, actually it is working as expected for the first time div a div b div c This is the condition I gave <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo!==3 && getInfo !== 5"></div> <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo==3"></div> <div class="pl-2 flex-grow-1 d-flex" *ngIf="getInfo==5"></div> Initially when I load first page first div is working as expected, no issue there. But when I got to second page the second