Most voted "angular" questions
Angular is a framework created by Google for the development of web applications. Use this tag for questions about syntax, errors, doubts, among others. Not specific to a version. For Angularjs-related issues (1.X) use the Angularjs tag.
Learn more…2,063 questions
Sort by count of
-
0
votes1
answer157
viewsCreate array with Firebase return data
You would need to create a new array from the return of the Firebase image URL The newImgList array receives nothing. task ts. imgList: []; newImgList: any = []; constructor(...) { this.tarefaId =…
-
0
votes1
answer154
viewsPrimeng - Search multiple fields in Picklist
I’m using Picklist on an Angular 7 app. In Picklist, I need to search more than one field displayed in the container. On their website (Primeng) there is an example: Picklisttutorial On the tag,…
-
0
votes1
answer44
views*ngSwitchCase is not rendering the element as per condition
I have two components that must be rendered according to an expression: HTML: <div *ngFor="let avaliacao of avaliacoes" [ngSwitch]="escolha_layout_avaliacao">…
-
0
votes0
answers15
viewsCreate a user without current Logout - Firebase
When I am logged in to the App and create a new user automatically the active user becomes the newly created one. Some solution with Angularfire to get around this? collaborator.ts colaborador:…
-
0
votes0
answers65
viewsHow to iterate variable at angular every time a certain condition is met?
<div *ngFor="let elemento of team.elementos" class="{{elemento.colunas}}"> <div *ngIf="(elemento.dataPublicacao < hoje) && (elemento.dataValidade > hoje)">…
-
0
votes1
answer84
viewscan not read Property 'map' of Undefined
I’m trying to create some dynamic checkboxes, but when I run the browser informs "ERROR Typeerror: Cannot read Property 'map' of Undefined" Because? export class FormPostsComponent implements OnInit…
-
0
votes0
answers235
viewsHow to leave mat-select checkbox marked as default
I’m having a problem in an angular design, I have a checkbox within a <mat-select> to make a filter, however I wish that all fields already start enabled and not disabled, follows code: export…
-
0
votes1
answer782
viewsAngular 7 - Open imported component in another module
I’m having a question of how to call a component that is imported into another module. The situation is as follows: I have the profile component, where I list the company profiles. Each profile has…
-
0
votes1
answer339
viewsHow to use Infinite Scroll within an ion-card?
I need the InfiniteScroll issue an event while rolling the scroll of card, and not the page. import { Component, OnInit, ViewChild } from '@angular/core'; import { GrupoService } from…
-
0
votes1
answer248
viewsAngular 7: Add multiple parameters to the URL with Httpparams
Reading the angular documentation I managed to develop the following search method with filters, but the problem is that I need a search with several filters and not just 1 as shows the code below…
-
0
votes1
answer25
viewsng2Charts Linea: How to apply responsiveness to this graph?
I’m using the online chart of ng2-Charts, It has a good view on my monitor, but in mobile is a bad view of the data. My chart in the default display of the monitor: The same resized graph: My html:…
-
0
votes1
answer874
viewsAngular 7 - Reload datatables after deleting an item from the table
The datatable presents an error after I delete an item from the table, the message includes a site that eh this: Cannot reinitialise Datatable I thought of some way to "go back and forth" the page…
-
0
votes1
answer21
viewsError updating angular Elasticsearch index
I basically have the following function: this.es.update({ index: 'contentman', type: 'sites', id: "_id", body: { name: form.value.name, description: form.value.description, url: form.value.url,…
-
0
votes1
answer354
viewsMake Calculator Using an Angular Dropdown
Some of you may have seen that I’ve been doing angular study since the zero... I thought of making a calculator using a dropdown to already work the Binding features The point is I can’t get the…
-
0
votes0
answers574
viewsAngular 6 ng test error Cannot match any Routes
Error while rotating ng test. { "message": "An error was thrown in afterAll\nUncaught Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'home'\nError: Cannot match any…
-
0
votes2
answers78
viewsSend Id via Independent Components from a Link and Miter, Angular 2 (7)?
I need to communicate between two components. From a selection (First Component), I send the ID to the other component, in ngOnInit I receive the value of this ID (Second Component), but when I try…
angularasked 5 years, 6 months ago Rebeca Nonato 1,163 -
0
votes0
answers696
viewsCannot read Property 'Name"' of Undefined at Object.Val [as updateDirectives]
I’m doing an Asp.Net Core Web API with Angular 7 CRUD and I’m having trouble in the final phase, just when I enter my angular localhost and open the console, I come across the following log (Note,…
-
0
votes1
answer609
viewsChange form depending on radio button - Angular 2+
I have 3 radio Buttons, when I click on each one should appear a different fomulário. I looked for some examples, but what I found are only two options. Follow the code I have at the moment <div…
javascript angular typescript javascript-events angular-6asked 5 years, 6 months ago Guilherme Lucas 133 -
0
votes0
answers107
viewsformArrayName (fb.array) - html getting formControlName (value) wrong by deleting Dice from array
I am trying to remove array from Formbuilder, but by removing the array formControl values inside the input are getting wrong. product logic I made an array with three levels being { "fileimg": "",…
-
0
votes1
answer901
viewsHow to update data when changing Angular component
Basically my data is updated, but when I go to another component that shows this data, they are still outdated. I have to go to another component and come back again to update them. I tried to use…
-
0
votes0
answers93
viewsImage is not rendering in email
I am sending email with Aravel, the image img src that I send by email is sent by frontend: When uploading an image the image variable src is assigned to the image: handleInputChange(e) { var file =…
-
0
votes0
answers19
viewsField filled with today’s date on view startup
Hello, I wanted to put today’s pre-set date in a date field on view startup. I tried so: Component: this.MeuForm = this.fb.group({ dataInicio: [{date: {year: (new Date()).getFullYear(), month: (new…
angularasked 5 years, 6 months ago LeoHenrique 954 -
0
votes1
answer117
viewsngFor in array within another array with API links
I am using the API publishes swapi to list Wars star movies in a list and within each movie I want to list the characters, the json response of the api is this: { "title": "A New Hope",…
-
0
votes1
answer134
viewsProblem in image size validation
In my application I make a preview of the image, this part is ok, but the client wants to validate the dimensions before the upload. At first it would also be ok, if it were that in a few moments…
-
0
votes1
answer65
viewsI have class definition but the object coming from JSON does not keep the methods
I have a problem at the moment I get the JSON from the server and I want to use it as my local class. //classes export class Pessoa { id: number; nome: string; raca: Raca; constructor(){}…
-
0
votes0
answers22
viewsShow json fields on screen
I get following Json: I would like to show on screen the following fields in a table: standings>0>table>All returns from 0 to n What I have so far is: <div *ngFor="let tabelas of…
-
0
votes0
answers82
viewsProblems to anchor with jquery
Hello, I’m making an application in angular 7, and I’m wanting to use anchors in the menus, as I found no way to do via typescript made through jquery but the anchorage does not work as expected,…
-
0
votes1
answer268
viewsUsing one System variable in another - Angular IONIC
I’m starting with Angular and would like to know if there is any way to pass the value from one variable to another. defineDificuldade(dificuldade) { console.log('Selected level ~~> ',…
-
0
votes0
answers49
viewsProblem with CORS in Angular 7 application and Webapi
Hey, guys, good morning. I am creating my first Angular 7 application with . NET Core Webapi. After all the structure of the mounted front, I went to communicate a get in an api I created and…
angularasked 5 years, 6 months ago Carlos A. S. Moretti 50 -
0
votes1
answer235
viewsData Return with Angular
I have a service with the following structure: import {Injectable} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import 'rxjs-compat/add/operator/map'; import {map} from…
-
0
votes1
answer622
viewsPrimeng p-editor error in Angular 7
I followed the documentation as the site says: example p-editor. But he gives me the following mistake: ReferenceError: Quill is not defined at…
-
0
votes0
answers428
viewsAngular : how to update the variable in html automatically when its value is changed in file . ts?
I have a variable that gets value when the page renders, and it looks right in the template. However if I change its value with the page already loaded the value in . ts is updating (checked with…
-
0
votes1
answer211
viewsHow to make specific array data not repeat in *ngFor or array
I have an array with the user data, which is the data that it hit point on that date that ta in the array. array: [ 0:{CCT: "150403",CODIGO_EVENTO: "012",COLABORADOR: "FULANO",DATA:…
-
0
votes0
answers49
viewsHow to retrieve information from one httpOptions in another Angular component?
I basically have a component user-login-component and in it I have the following function:: userLogin() { this.restApi.auth(this.userDetails).subscribe(dados => { var headers_object = new…
-
0
votes0
answers35
viewsAngular loadChildren with sub folder Viewdestroyederror error: Attempt to use a destroyed view: detectChanges
I have the following scenario. My app.routes.ts have got: { path: 'workflow', loadChildren: () => import('./workflow/workflow.module').then(m => m.WorkflowModule) } In my workflow folder I…
angularasked 5 years, 5 months ago Bruno Cursi 1 -
0
votes0
answers27
viewsMeta tag, Open Graph script generated
Next the metatag works normal when added in the . html, but when using the same metatag in the angular Meta is not recognized. someone has already gone through this trouble to give a helping hand?…
angularasked 5 years, 5 months ago Felipe Kusk 41 -
0
votes1
answer86
viewsPage change "Onclick" always "invalid views to Insert"
I would like you to click a button, change page. I’m in inicio and would like to go to add-oferta. top html. <ion-fab bottom right > <button ion-fab color="secondary"…
-
0
votes1
answer684
viewsI cannot navigate correctly using ion-tabs (IONIC 4)
I have the following code structure: app-routing.module.ts import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; const routes: Routes =…
-
0
votes1
answer318
viewsDisconnect users or authenticate them again if the server is restarted - Angular 2
I have an Angular 2 application that is consuming an API in Nodejs. This application has JWT authentication. My problem is this: When the Node server is restarted, the user is still able to navigate…
-
0
votes2
answers1227
viewsFilter in my table created with Ngfor
I created a table with Ngfor (actually, my whole project uses ngFor structures as default), I saw that there is an Ngrepeat and there is a filter for it. In order to avoid migrating my ngFor…
-
0
votes1
answer855
viewsHow to disable the right mouse button event in Angular 7?
I am trying to disable that menu that appears on the page when the user clicks with the right mouse button. At Angular, I can catch the click event using (click)="onRightClick($event), but I only…
-
0
votes2
answers291
viewsIs it possible to pass a formgroup to the parent component?
I have a parent component and a child component, I need to pass the formgroup of the child component to the parent component, I tried it that way: Child element: @Output() formGroup = new…
-
0
votes1
answer312
viewsKarma unit tests (typescript/angular)
I am trying to perform a unit test for a method made in typescript, this is the method: createTasksForms(): void { this.task.forEach(task => { task.form = this.form.group({ name: ['',…
-
0
votes1
answer270
viewsUnit Karma Test for Typescript/Angular Method
I’m having trouble testing a method of select, that’s the method: select(task): any { (document.getElementById(task) as HTMLInputElement).select(); }; It is called by html, in this part here:…
-
0
votes1
answer85
viewsFixed header without transparent background
I have a header fixed on my page with a background image, when the scrolling happens the header goes along and has to overlap the html that is underneath, and does not become transparent, but it is…
-
0
votes1
answer1262
viewsERROR Error: Uncaught (in Promise): Error: Cannot match any Routes
I’m getting the following error when I try to edit the entered information [routerLink]: ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment:…
-
0
votes0
answers445
viewsIONIC 4: Cannot read Property 'get' of Undefined
I’m trying to get some database information through the function get(), but when I try to run it, gets the error: ERROR TypeError: Cannot read property 'get' of undefined at…
-
0
votes0
answers134
viewsProperty 'readAsArrayBuffer' does not exist on type 'File'
I’m trying to implement gallery photos in my app and get this error. HTML: <ion-content > <ion-button (click)="openGalery()" expand="block"> Escolha uma foto </ion-button>…
-
0
votes0
answers36
viewsAngular Components 2
I’m having doubts about component inputs: I have a component called field .ts import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-field', templateUrl:…
-
0
votes2
answers159
viewsHow to access a variable within ngAfterViewInit() in Angular
I have looked here in the stack but I did not find the answer. Does anyone know if you can access a variable that is inside the ngAfterViewInit() in Angular. In the code below, in the last line when…