Questions tagged as 'typescript'

1
answer

typescript + type definition file (.d.ts) + enum (enum)

I'm trying to create a definition file that uses an enumerator, defined in another file, and a declared variable (declare var) in the .d.ts file, but when referencing this file in another implementation, it says that variable does not exist....
asked by 05.12.2014 / 12:15
0
answers

Accessing private property with decorator in typescript

In Typescript, is it possible to access a private property by the decorator? An example of the code I've already done class A { @dec private _teste: string = 'teste' constructor(){} public get teste() { return this._teste...
asked by 02.01.2019 / 23:31
1
answer

Recover Header from an Http Response with angular

I need to retrieve the Token that comes in the authorization and save it in the localstorage, but I'm not getting it. My login method within my service is: public login(email: string, password: string): Observable<User> {...
asked by 09.12.2018 / 16:19
1
answer

Iterate values of two requests in * ngFor

I'm making two requests in the database, one brings the grouped requests just for preview on the front, the other brings all the values, the latter needs to show the total of each request along with the first request view. listOrders() {...
asked by 03.12.2018 / 15:38
0
answers

My empty default route is falling on last lazy loading configured

I have the following default route: const dashboardRoutes: Routes = [ { path: '', loadChildren: 'src/app/components/dashboard/bemvindo/bemvindo.module#BemVindoModule', canActivate: [AuthGuard] }, {path: 'dash', component: DashboardComp...
asked by 03.12.2018 / 16:59
0
answers

How do I correct so that I select only one item marked on the toogle button?

I have a little logic problem, when I select only a toogle button, it brings the value of the two items in the list, I need to return only that item that is marked on the toogle button. this.produtosProvider.getAll() .subscribe( produ...
asked by 27.11.2018 / 14:47
0
answers

Angular continues my function before the dialog response

I have a function that calls a dialog if a product's SKU is changed, but the function is being continued before the dialog output. Is there any way to wait for the result and then continue the function? salvaAlteracoes(){ for(let i=0;i&...
asked by 06.12.2018 / 18:58
1
answer

How to get the Header of a response with Angular 2+?

How do I get a Header for a response with Angular 2+? In my case, I'm using version 6. I would like to get this authorization data to be stored in the Browser's LocalSession. I am using the following method to perform the request:...
asked by 22.10.2018 / 15:52
1
answer

NodeJS - TypeError: Can not read property 'get' of undefined

I'm a beginner in NodeJs and I came across this problem when I was exporting a module: "TypeError: Can not read property 'get' of undefined" . I did not understand why it gave the error since the code is identical to the one of the course teach...
asked by 17.12.2018 / 17:43
0
answers

HTTP request falling into catchError

I'm trying to do http request inside the httpInterceptor, however it always falls in the catcherror, it is printed on the console the "fell into err". intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any&...
asked by 05.12.2018 / 19:23