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
answer233
viewsHow to use the reference of a Barrel file in the same folder with Typescript
I’m having trouble referencing files that are in the same folder when working with a Barrel type file in my project is in Angular (version: 4.0.0). My problem is this, see the file and directory…
-
2
votes2
answers3047
viewsHow to insert HTML within an Angular 4 Component?
Hello! How to insert an HTML code into an Angular Component? For example: I have the Component button: whose code is: <button type="submit"></button> I would like to insert the html in…
angularasked 6 years, 10 months ago Wallace Magalhães 1,242 -
2
votes0
answers413
viewsProblems with ngFor object containing objects
I’m using it as follows: <ion-item *ngFor="let via of lines.daysOperations?.week?.tripA?.routes; let i = index" text-wrap (click)="toggleGroup(i+'i')" [ngClass]="{active:…
-
2
votes1
answer5390
viewsWhat’s the angle for?
The question is really simple, I am working with Angular at the moment to learn and I am creating a Landing-page using some angular features like ngFor and so on... but I would like to know what…
angularasked 6 years, 9 months ago Uilian Kidricki 59 -
2
votes1
answer1332
viewsDecimal mask on an ion-input type "number"
I need to make a value mask (9 digits with 3 decimals), and when the user starts to enter the value, the field place the commas and point automatically, similar to what happens today in the bank…
-
2
votes1
answer671
viewsHow to instantiate Httpclient in Angular 4 typescript?
Based on this example for Http, I would like to know how to instantiate Httpclient: **constructor() { const browserXhr: BrowserXhr = new BrowserXhr(); const baseResponseOptions: ResponseOptions =…
-
2
votes1
answer510
viewsPass variable in *ngIf
I have a variable in my input.component.ts calling for validacaoExterna, that receives a string from whoever is going to use it.. @Input() validacaoExterna: string; In my input.component.html I have…
-
2
votes1
answer276
viewsHow do I deploy an Angular app to Heroku using Gitlab?
Angular Use 5 (5.2.10) and Angular CLI (1.7.4) and I would like to deploy to Heroku, but my files are in the Gitlab repository. Some more information: Node (8.11.1) and npm (5.6.0).
-
2
votes2
answers911
viewsURL exchange but view keeps - routing with angular 4
Good afternoon, everyone, I am creating a page at the angle where it will have a button that will pass as an ID parameter and receive this ID on the other page. I’m using the Angular Router but I’m…
-
2
votes2
answers4609
viewsHow to pass a GET parameter in a URL in Angular 4+ ? Using the route system
I need to insert a parameter GET after entering the page with the URL. For example: I clicked here and went to page y. http://example/paginay**?= parametroGet** The get parameter will be an ID,…
-
2
votes2
answers3741
viewsTake a select value at the angle
Good morning! I need to take a value from one select to pass the value to the other, but I am new in angular and html... Code of the select: <div class="col-md-3"> <select…
-
2
votes2
answers8439
viewsHow does the Grid System work in Angular Material Design?
In the documentation of Angular Material Design has a component called Grid List, which, I imagine, is the structuring part of the layout, but it only has two very simple examples and I couldn’t…
-
2
votes0
answers535
viewsProblem with Node-Sass
I’m using the Ode 8.9.1 with npm 5.5.1 and @angular/cli 1.5.0. When running npm install I get the following error on the terminal: Downloading binary from…
-
2
votes1
answer307
viewsSend headers in angular http request
I need to send three values in my header in http request, but when I check in the browser I realize that my headers have not been sent. I tried something like:…
-
2
votes1
answer876
viewsDelay on application startup
I created a cross-platform application using Ionic 2 + Angular 2 according to the Get Started of ionic documentation. The basic command to create a project with side menu is this way below: $ionic…
-
2
votes1
answer5848
viewsHow to install a previous version in Angular
Good evening, my question is very simple, but I did not find the answer, as I install a version 4 of Angular, if the current one is in the 6? I tried to npm install -g @angular/cli@4 or npm install…
angularasked 6 years, 1 month ago Priscila Neu 121 -
2
votes1
answer669
viewsHow to break lines according to a value
How do I break lines according to the value ? For example a = 8. There I have a variable "d" q takes a string. var d = "written work considered in its original wording". If I put an If = a; it…
-
2
votes1
answer264
viewsHow to use Trackby in ngFor in Angular?
Hello, I have a repeating structure where a pipe filter can be applied.I have read that trackBy can help performance because it does not render the DOM unnecessarily. I put it in my component:…
angularasked 6 years, 1 month ago veroneseComS 2,752 -
2
votes1
answer1194
viewsPOST with angular 5
so I’m trying to make an app with angular 5 using auth with token. For this, in the login, I need to do a post on my API (which I tested by Postman and is working), but I’m having trouble doing this…
-
2
votes1
answer263
viewsTypescript "private" access modifier
In most examples I find Typescript I see that the class attributes do not use the access modifier private. It is a matter of design or there is some difference in operation compared to Java? export…
-
2
votes2
answers619
viewsIt is possible to return a Observable<Boolean> from the get request
I need to check if the api is active. Basically I’m trying to check if the request status is 0; if so, I know the api is out of order. But I wanted to put this method in my service class and only…
-
2
votes2
answers131
viewsDifference between the event (Submit) and (ngSubmit)
Well, I’ve seen some articles explaining that "ngSubmit ensures that the form is not sent when the handler code is released (which is the default sending behavior) and causes a real http posting…
angularasked 5 years, 10 months ago Júlio Saldanha 56 -
2
votes3
answers165
viewsProblem checking if a type any is Undefined in Typescript
I am having a problem checking if a variable is Undefined in the following typescript code. Atendimento:any; this.Atendimento.Checkout.Observacao == undefined ? '' :…
-
2
votes1
answer324
viewsHow to pass ngFor index in ngClass
I’m trying to pass the index of ngFor within the ngClass to activate the correct class. I have tried several ways, but could not. Follows the code: <td *ngFor="let cell of row; let i = index"…
-
2
votes2
answers1211
viewsHow to Create a Reusable Component in Angular
I am with a system where all modules have a standardized record listing screen with pagination. I adapted a pagination code I found on the Internet to make pagination on demand. However, instead of…
-
2
votes1
answer148
viewsComponent Angular Autocomplete
I am using in my project the components of the Primeng library. Would someone like to tell me if in the Autocomplete component (of this library in question) it is possible to set a default value for…
angularasked 5 years, 8 months ago GUSTAVO HENRIQUE LOPES SPACHUK 93 -
2
votes1
answer32
viewsHow to Add Angular Library to an Ionic Application
I have an angular 7 lib, which works normally when I import the library module into the main module of the Ionic application, the problem is that if I use the Ionic router to insert the "home"…
-
2
votes1
answer645
viewsHow to create a regex to delete letters and number after the 3rd decimal place
I need a regular expression with the following rules: Erase all that is letter Delete all number after 3rd decimal place For example, if I type 34,444 any next number will be deleted. If I type a…
-
2
votes2
answers88
viewsProblem with creating a new Angular application
Hello, good afternoon to all of the community. Start a new project to develop an application I’m planning to develop, but when you give the command to create a new angular app, which is: ng new…
-
2
votes1
answer1216
viewsNon-static Method error requires a destination. '
I have a little problem and I need your help to help me solve it. How the error is occurring: Basically it is occurring, when I click on a button to open a modal to bring the information I want…
-
2
votes4
answers6996
viewsTypeerror Cannot read Property 'name' of Undefined at Angular 4
My application is working perfectly, the only thing wrong is taking this error message; MidiaExibirComponent.html:13 ERROR TypeError: Cannot read property 'nome' of undefined at Object.eval [as…
-
2
votes1
answer574
viewsPipe not found - Angular 5
I’m having a problem creating a custom Pipe. I created the following module (Pipes.modulets.): import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {…
angularasked 6 years, 6 months ago Thiago Prado 71 -
2
votes2
answers552
viewsCustom input component
Hello, I have a form 'Reactive Forms' where it has several fields, (several inputs), so I decided to create a Component and run an ngFor on it to reduce the number of lines... Component html <div…
-
2
votes1
answer481
views@Angular in global and non-local repository for all projects
I installed @angular/cli like this: npm install -g @angular/cli I created a project like this: ng new name-project So far so good, but there is the possibility that when you create a project with…
-
2
votes1
answer204
viewsMenu and routes and subroutes
I have this file that mounts the menu. import { Injectable } from '@angular/core'; export interface BadgeItem { type: string; value: string; } export interface Saperator { name: string; type?:…
-
2
votes2
answers763
viewsAsync/Await x Sync
I’m studying synchronous/asynchronous behaviors at the angle and I’m not sure when to use async and await.... Correct me if I’m wrong... I understand that for me to call with await, the return has…
-
2
votes2
answers83
viewsHttpclient at Angular 4
Guys, I need help with Angular 4... I need to consume an api (json-server)... for testing, I put the content of Json directly in the code, as below... but now I need to replace it with the address…
angularasked 6 years, 6 months ago Bruno Sousa 110 -
2
votes0
answers28
viewsDeploy Angular 8 app to Firebase
Hello, I’m a beginner in Angular and Firebase. And I’m developing a little app for my fiancée. A system where she will arrange the orders, stock and etc from her small workshop of manual embroidery.…
-
2
votes1
answer100
viewsUpload image without page load
Good evening, I’m uploading file, it’s working but every time I send the file to page updates, could someone give a tip on how to fix it? I’m using angular 5. Component. OnSubmit(){ const formData =…
-
2
votes2
answers1162
viewsIonic - wait for http get return
Edit: solution in the third answer. I’m trying to do a login function for a project on Ionic 2. This function checks if the user is registered in the database through the php server and returns the…
-
2
votes1
answer95
viewsWhat is Simplechanges in Angular? Is it an Angular API?
I have the following code: @Input() listas: IniciarFuncaoModel; ngOnChanges(changes: SimpleChanges): void { if (changes.listas) { this.iniciarFuncao(); } } Simplechanges is an Angular API? I…
-
2
votes3
answers2679
viewsApply mask to an HTML table column with Angular?
How to put CPF mask in a table ? For inputs I used the ui-Cpf-Mask directive, but need to put in a table cell. code: <tr *ngFor="let user of users | async"> <td>{{user.nome}}</td>…
-
2
votes1
answer42
viewsHow to get the last n elements of an Observable?
I own a service that is receiving an array objeto API with the function below: getUltimosDados(n: number): Observable<Objeto[]>{ return this.httpClient.get<Objeto[]>(this.enderecoDaApi +…
-
2
votes2
answers51
viewsLazy-Loaded and angular charging shapes
Hello good afternoon everyone... I’ve been an angular developer for a while, and I’ve come across two ways to make the famous Lazy-Loaded, which are: { path: 'rota', loadChildren:…
-
2
votes1
answer94
viewsTag <head> <body> in Angular projects
I’m studying Angular and I was left with a ref doubt. the use of tags <head> and <body> For example, in an html file would: <head> <title>{{ tittle }}</title>…
-
2
votes1
answer154
viewsFor do not wait to finish requisition, it continues counting
I am developing an application in Ionic and I have a problem when I do a loop loop. In this loop there is a call from a method of a previous, that makes a request put. My problem is that the for…
-
2
votes1
answer411
viewsPOST method in Angular
I have a simple Angular application and need to make a call to my API to get one token. But I am facing difficulties. I will try to explain a little about my flow. I created a service class where I…
-
2
votes1
answer777
viewsPass value to another angular page
Good morning!! On a given page I have a button that takes code and name of a customer and I need to pass this information to an input of another page: Page of the function that takes code and name…
-
2
votes1
answer28
viewsDo you have a problem adding more than one CSS library to an Angular project?
How many can I add? Is there a recommended limit? This interferes with application performance?
-
2
votes2
answers683
viewsRemove table line html with typescript
Good morning!! I own a table html and need to delete a line from it with a function typescript(angular 2, preference)... Follows the Table Code: <div class="col-md-12"> <div…