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
-
2
votes1
answer139
viewsSearch Array with case-insensitive javascript variable
I need to search an array with values of the type: equipamentos = [{marca: 'Nomedamarca1', modelo: 'Modelo1'}, {marca: 'Nomedamarca2', modelo: 'Modelo2'}, {marca: 'AlgumNomeComCase', modelo:…
-
2
votes3
answers476
viewsObservable returning Undefined
I am trying to load a list on screen in my browser using Observable, however I am not succeeding, this is record that exists in my url; This is the class of services import { Http } from…
-
2
votes1
answer78
viewsIs there anything that compares the type of the object?
I want to test the type of the object not its value, more or less this: component1: IndexComponent if(component1: IndexComponent) { dosomething(); }
-
2
votes2
answers1849
viewsIs it possible to get the firebase user via UID?
Doubt consists in the following problem: I have a project using firebase and Ionic 3. I am using the authentication mode via E-mail, in which you have the email and UID stored. For example: I have 2…
-
2
votes1
answer33
viewsImmutability in the angular components
Hello, I am learning functional programming and would like to know how to apply the principle of immutability in the angular components. For example, in the case below I have a list of files that…
-
2
votes1
answer364
viewsTable mat-table does not render in browser with Angular 6
In the browser debug caught this error(screenshot): This is my page html (test) <div> <label>Nome: <input [(ngModel)]="operator.Name" placeholder="Nome"> </label>…
-
2
votes1
answer72
viewsHow to import node_modules styles into an Angular 10 library?
I am developing an Angular 10 library. This library uses Swiper JS as a dependency. My library should import css styles from Swiper. I import Swiper styles from node_modules using the @import scss.…
-
2
votes0
answers96
viewsImage does not appear in the table
Use Angular 6 and bootstrap. I have a table and did this to display an image: ........ <tbody> <tr *ngFor="let operator of dataSource"> <td>{{ operator.operatorId }}</td>…
-
2
votes0
answers275
viewsDefine Matdatepicker component format
How to define component format Datepicker in Angular 6. In my Angular 6 application, I am working with the database Cloud Firestore of Firebase. When performing a document query, when the document…
-
2
votes1
answer8567
viewsProblem with CORS at Angular 5
Guys I’m with a test application on Angular 5 and I’m trying to consume the Webservice from the top hat. When performing this attempt the following error appears: Failed to load…
-
2
votes1
answer4397
viewsForm validation with angular 6
I have this form, very simple, with just a field and a button. I gave a required input, and when I write with the empty and/or null field, it does not write(correct), but already switches to the…
-
2
votes1
answer183
viewsSelect array to save
Making an array of selects using multi-select, but select them is not communicating, when I select one appears in the json, but when I go to select another subscribes those I selected. I’m using…
-
2
votes4
answers9163
viewsHow to refresh the screen in Angular?
Observe the code below; import { Location } from '@angular/common'; @Component({ selector: 'app-node-paginate', templateUrl: './node-paginate.component.html', styleUrls:…
-
2
votes1
answer1207
viewsTypescript - Error TS1206 Decorators are not Valid here
I really need a help, I can not at all run my app FRONT END, a company project, when I give a npm start on my terminal in visual code, a blessed error persists, which is on @Component saying Error…
-
2
votes2
answers1941
viewsHow to validate email and CPF at angular 5?
Dear, I would like to know how I can validate the e-mail and CPF in angular 5. I made the basic code: <mat-form-field class="full-width"> <input matInput placeholder="E-mail"…
-
2
votes1
answer274
viewsHow to copy an html block when you click a button in Angular?
I am developing an Ionic/angular application with a firestore BD up to there everything well. I’d like to do this post link I can inject the code via "ng-template" but I don’t know how to do it to…
-
2
votes1
answer90
viewsMy filter pipe is returning the wrong columns from my table
I tried to deploy a filter pipe but realized two wrong behaviors. Having two elements in my table: sfafasf:150,00 and other variable cost: 80,00 When you put the name "other variable cost" in the…
-
2
votes1
answer245
viewsNo component declaration after applying Lazy loading
I am trying to apply Lazy loading on my application, but after I removed the module import in the app.module and left only on loadChildren, my application does not recognize one of my component…
angularasked 6 years, 1 month ago veroneseComS 2,752 -
2
votes0
answers144
viewsHow an authentication validation works with Angular + PHP
I am beginner in angular (version above 2) I am studying the communication of angular with PHP, in the httpClient part (of rxjs) to make the GET, POST, PUT and DELETE understood well. My question is…
-
2
votes1
answer1085
viewsProblem running ng build Angular
Hello, I’m having trouble in Angular when I run the following command to building in the project directory ng build --prod --aot=false, how do I fix the problem? What and why is this error…
-
2
votes1
answer137
viewsProblem with *ngIf: Cannot read Property 'indexvariacaoatributo' of Undefined
I have a reactive form and I need to show this card only when in my array listAtributos[i].indexvariacaoatributo is different from null. It turns out that initially there is no…
angularasked 6 years ago veroneseComS 2,752 -
2
votes0
answers800
viewsJavascript does not work on the localhost but works on the server
I have a project that has a graphic generated by javascript and angular logo on the home page after a login, however, in my localhost this graph was never shown and I arrived at a part of the work…
-
2
votes1
answer977
viewsReuse component in another component and get child data in Angular
I made a zip code search component this way: I created the component, its HTML is: <fieldset [disabled]="isLoading"> <div class="row col-md-6"> <div class="row"> <div…
-
2
votes1
answer556
viewsChange attribute of one component into another component at the angle
I have two components: Registration and Login In the Registry I have this anchor: <a id="titleClient">Already have a account? Click here</a> I need when the user clicks on the anchor to…
-
2
votes1
answer215
viewsPerform validation in the form only after losing focus on the Validator angle
I’m using the validations of the reactive forms at the angle, I put a valid email validation, the problem is that while the user is still typing the email already appears the . I would like to know…
-
2
votes1
answer218
viewsngx-bootstrap + angular 6 + datepicker
Hello, I am using ngx-bootstrap datepicker for the first time and am encountering some difficulties. One of them is that when selecting the desired date, my input is in the exact format I need, as…
-
2
votes1
answer102
viewsHow can I shape the object generated by Frombuilder?
I use Formbuilder to generate an object and send it to an API, but the generated object is not quite the format the API expects. I need to know how to add objects inside objects using Formbuild. I…
-
2
votes2
answers79
viewsGoing through an archive of constants
I created the following constant file (constants.ts): export const USER_INFO = 'user-info'; export const USER_SEARCH = 'user-search'; export const USER = 'user'; This file is used to set, retrieve…
-
2
votes1
answer395
viewsPass data from one component to another in angular
I have a component that shows an image and another component that should change the src of that image. This is what I tried to do: Profile.component.ts alteraDadosPerfil(){…
-
2
votes1
answer226
viewsngModel validation does not work in select field
I am trying to put a required validation in select and then show if the user fails to fill in. I tried something like: <select required #selecttipoproduto="ngModel"…
-
2
votes1
answer92
viewsGo inside to compare if there are equal values
I need to do one to check if inside my array this.variacaoForm.value.variacoes has a sku like the other, I tried something like: for(let i=0;i<this.variacaoForm.value.variacoes.length;i++){…
-
2
votes1
answer20
viewsUpdate "Validators" using "Directive"
My code I created the following directive to prevent the user from inserting special characters in inputs. import { Directive, HostListener } from '@angular/core'; @Directive({ selector:…
-
2
votes1
answer449
viewsSelf complete material how to stay the mat-options after selecting an option?
I’m using the Material Auto Complete Angular After selecting an option from the list the mat-options disappear, I would like them to remain until you click out of the input. Follow gif showing the…
-
2
votes1
answer250
viewsLeave some input select Multiple(Angular Material) pre-marked
I am using Angular Material in my application, and it in turn has this list created to fill in my input: lista: any[] = [ { name: 'Cursos', tribunais: [ { value: 'RDC1'}, { value: 'RDC2'}, { value:…
-
2
votes3
answers530
viewsFind an object in the array that has a specific key
I have the following object array: specifications: Array(63) 0: {key: "1", value: null} 1: {key: "11\uFF0E11", value: null} 2: {key: "155\uFF0E50", value: null} 3: {key: "2", value: null} 4: {key:…
-
2
votes1
answer381
viewsProblems while trying to recover data from firebase Realtime database
I’m doing my TCC using Ionic 4 and firebase Authentication and Realtime Database, for a few days I ended up crashing when I try to recover only one user from the database, when the user data is…
angular ionic firebase typescript firebase-databaseasked 5 years, 8 months ago Alexandre Scussel 21 -
2
votes2
answers475
viewsHttpclient POST request with Angular 7 returning Undefined
all right? I’m having trouble making http requests on my Angular CLI project. When I use this.http.post(url, dados, config).subscribe(ret => this.retorno = ret) and then I give…
-
2
votes2
answers745
viewsPass more than one parameter in a request in Angular for Webapi
This is the web api: [Route("{pagina:int}/{tamanhoPagina:int}")] [HttpGet] public IHttpActionResult UsuarioPaginado(int pagina = 1, int tamanhoPagina=10) { var _aluno = iAluno.Listar() .Where(x…
-
2
votes3
answers397
viewsFooter does not remain at the bottom of the page
I have the following footer: <footer class="page-footer font-small footer-fundo-cinza"> <div class="container"> <div class="row pt-3"> <div class="col-md-4"> ... </div>…
-
2
votes1
answer590
viewsAngular 7 Child Routes import Component using modules
I’m trying to set some daughter routes in my angular application 7 but they don’t work, I have the following scenario: I own a base-home.component and a home.component, I encapsulated the two…
-
2
votes1
answer328
viewsPrimeng Rowexpand expands all lines, need it to expand only the selected
I need the expansion to be just in the line of the clicked icon, tried several ways but could not. I have the following html code: <p-table [value]="pacientes" [paginator]="true" [rows]="5"…
-
2
votes1
answer2359
viewsHow to pass and receive a parameter between angular components
I was passing the parameter Id using Routes: const routes: Routes = [ { path: '', redirectTo: 'sites', pathMatch: 'full' }, { path: 'addSite', component: AddSiteComponent }, { path: 'sites',…
angularasked 5 years, 6 months ago Matheus Ribeiro 143 -
2
votes1
answer1116
viewsMaking sum with angular
Someone could help me, I’m starting to use Angular now, and I’m having a big confusion at the time of how to study... Basically, when I click the button it does nothing... it is possible that the…
-
2
votes2
answers548
viewsHow to use Mysql SELECT + WHERE + IN with Javascript array?
How can I perform the following SQL query by passing a Javascript string array? SQL query performed in Mysql - status OK: SELECT * FROM tab_price_list AS PL WHERE PL.PartNumber IN ('HDW00008.ELEM',…
-
2
votes1
answer189
viewsformControlName with *ngFor
I have a form with 3 fields q will be used by the user: a select, a textarea and an input. These fields are filled with an ngFor q data comes from the database: <form id="form-group"…
-
2
votes2
answers1648
viewsAngular error: Staticinjectorerror(Appmodule) for Activatedroute
It’s a problem when I ask my Activated route, I already have my application pass the ID properly to the URL and the mapping already includes the Routermodule.Forroot() on the routes. App module:…
-
2
votes0
answers168
viewsProblems to download the angular cli through the terminal due to the internet provider?
I have a problem (I am currently using windows 10) that I can not solve. When I’m using the Internet here in my house and give the command npm install -g @angular/[email protected] the terminal locks and…
-
2
votes2
answers444
viewsI cannot import a feature module into the main module. Angular
I have a functionality module called CategoriasModule and when I put the class name in the main module’s Imports this error appears: Uncaught Error: Unexpected value 'Undefined' Imported by the…
-
2
votes4
answers431
viewsDynamically change class
I have an html with ngFor: <div class="row p-3 border-bottom" *ngFor="let cont of contrib"> <!-- ! --> <div class="col"> <p [class.text-danger]="redName === true"…
-
2
votes1
answer176
viewsRoutes Lazy loading not being loaded after login
Lazyloading modules are only loaded after I re-load the page. In an application I have a problem: when I log in successfully, I am redirected to a route called 'Dashboard', but from there when I try…
angularasked 5 years, 4 months ago Lucio Leandro 21