i am calling rest api in angular5 and getting the following errors

Multi tool use
Multi tool use


i am calling rest api in angular5 and getting the following errors


import { Component, OnInit } from '@angular/core';
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Component({
selector: 'app-rest',
templateUrl: './rest.component.html',
styleUrls: ['./rest.component.css']
})

@Injectable()
export class RestComponent {
constructor(private http: HttpClient) { }
configUrl = "http://34.201.147.118:3001/getAllData";
getConfig() {
return this.http.get(this.configUrl);
}
}



I am calling the rest api in the following code and everything seems fine until I complied it and got the following error


1. i 「wdm」: Compiled successfully. ERROR in
src/app/viewall/viewall.component.ts(13,5): error TS1068: Unexpected
token. A constructor, method, accessor, or property was expected.
src/app/viewall/viewall.component.ts(15,14): error TS1005: ';'
expected. src/app/viewall/viewall.component.ts(22,1): error TS1128:
Declaration or statement expected.





Your error is in viewall.component.ts file post that code as well
– Sanoj_V
Jun 30 at 8:52










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Dqh6qKH1lmkrl7jQTmuUEIBy,EHFXunI8GP4yq8I2Rrpd16Qr6Qq Q79AVAcNsoiT RoT4Ut46fP AvZ1EPs1Qn6c1 zc dt,85tCt,Yaf
X6Qt3K6n54xYwTXoa88ylk2V32dCGKKkCv,OuZcHmz xd4gEC qEEjj

Popular posts from this blog

Delphi Android file open failure with API 26

.

Amasya