Questions tagged as 'angular'

0
answers

How to get the http data from get and show on the screen with Angular 2+

I'm having trouble getting a request with angular the backend is returning right but I'm not able to put the variable in html. app.compoonent.ts import { Component } from '@angular/core'; import { CanLoad, Route } from '@angular/router' imp...
asked by 07.01.2018 / 23:02
2
answers

Group an array of objects

I'm trying to group an array of objects coming from the database in the following format: [ { '12312312': { 'first_name': 'David', 'id_question': 0, 'acertou': 1 }, '23423423': { 'first_name': 'Luis', 'id_question':...
asked by 27.12.2017 / 23:24
0
answers

Hide menu items using Routes

I want to get information like the menu for a different route, for example, the "Mkt Place" client is not seen as "Seller" customer options, provided by the menu when the user enters the mktplace or 'seller' login "depending on the choice <...
asked by 19.12.2017 / 13:34
2
answers

Angular 4 - Input / Output Access parent event via Typescript

In Angular 4, how do I access the functions of the parent being in the child or the functions of the child being in the parent directly by the Typescript instead of traditionally accessing via tag attribute?     
asked by 27.12.2017 / 15:31
0
answers

Why the need to use "result as" in the return of a generic method?

Consider the following method: private handleError<T> (operation = 'operation', result?: T) { return (error: any): Observable<T> => { this.log('${operation} failed: ${error.message}'); return of(result as T);...
asked by 27.12.2017 / 15:17
1
answer

Angular 2: Please add a @NgModule annotation

I'm having an error asking to add the annotation @NgModule. But I believe this is okay. follows error: Uncaught Error: Unexpected value 'Http' imported by the module 'AppModule'. Please add a @NgModule annotation. at syntaxError (compiler....
asked by 04.12.2017 / 18:22
1
answer

Problems with Lazy Load angular 5

Error adding lazy loading Any help is welcome because I'm new to the angle. Do I need to set up any files for this to work? app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule, LOCALE_ID }...
asked by 01.12.2017 / 21:26
2
answers

Header customized angular 4, error does not authenticate

Good morning, I need to connect to a service that requires authentication by passing some headers, most of all ways I tried, does not send my custom header, here is the code below: public listarCategorias(): Observable<category[]> {...
asked by 02.12.2017 / 14:37
1
answer

Use toLowerCase () in an array of strings - AngularJS 5, TypeScript

I am trying to transform an array with strings inside in lowercase using toLowerCase, but it seems that it does not work with an array and only with a string ... How do I solve this? items: Array<{tag: string[], image: string, page}>; t...
asked by 25.11.2017 / 04:32
1
answer

Non-angular problem5 with HttpClient

I'm trying to make a request with angular5 for learning purposes and I'm not with you, follow the console log and the source code. ERROR Error: Uncaught (in promise): Error: StaticInjectorError[InvestimentosService]: StaticInjectorError[Inv...
asked by 06.12.2017 / 21:51