Saturday, October 3, 2020

Angular: Uncaught SyntaxError: Strict mode code may not include a with statement

 

ProjectPath\ClientApp\src\main.ts

Comment the following code  and 

//export { renderModule, renderModuleFactory } from '@angular/platform-server';



https://stackoverflow.com/questions/60114758/uncaught-syntaxerror-strict-mode-code-may-not-include-a-with-statement







Saturday, August 1, 2020

Angular

@Inject('BASE_URL') baseUrl: string




call serice:

 public signupUser(user: uservm): Observable<uservm> {
   return this.http.post<uservm>("https://localhost:44333/adminapi/createuser", user).pipe(catchError(this.handilError));
  }

  //public getUser(): Observable<uservm> {
  //  return this.http.get<uservm>(this.createUserUrl)
  //    .pipe(catchError(this.handilError));
  //}

  private handilError(errorResponse: HttpErrorResponse) {
    return Observable.throw(errorResponse.message || "Server error");
  }





call serece  method
this.asv.signupUser(this.uvm).subscribe(
      userdetail => {
        console.log(userdetail);
      }, error => { console.log(error); this.uvm.errormessage = error }
    );

Sunday, June 21, 2020

Angular: Exception: TS2300 (TS) Duplicate identifier 'IteratorResult'.


Exception: 
Severity Code Description Project File Line Suppression State
Error TS2300 (TS) Duplicate identifier 'IteratorResult'.  ClientApp (tsconfig or jsconfig project)  ClientApp\node_modules\@types\node\index.d.ts 73 Active



Solution:
npm install @types/node -global --save

Run this command