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
-
4
votes1
answer4785
viewsBest practices for creating an Angular project
I am studying Angular to develop a web application, and I would like to know what are the best practices regarding the creation of folders, creation of the classes related to the service and other…
angularasked 6 years, 5 months ago Macario1983 1,335 -
4
votes1
answer1332
viewsWhat _: and _
What does _: and _. mean in the definition of functions as in the example below. constructor(){ router.events.subscribe((_:NavigationEnd) => this.currentUrl = _.url); } I have many doubts about.…
-
4
votes1
answer4901
viewsLocale p-Calendar primeng Angular
Hello! I am using the componet p-Legend of the primeng and setting its locale to en as below: <p-calendar [(ngModel)]="filtro.dataEmissaoIni" dateFormat="dd/mm/yy" name="datai" [locale]="pt"…
angularasked 6 years, 9 months ago Edison Luis Werle 101 -
4
votes1
answer630
viewsDifference from Angular Production and Development Build
I would like to know the differences between the build of production and the build development in Angular?
-
4
votes2
answers4395
viewsPost com x-www-form-urlencoded no Angular
Hello, I have a POST request that is content-type: x-www-form-urlencoded. I need to pass some parameters on my Body, this way: I’m doing this way below to add my parameters on the request body:…
-
4
votes1
answer95
viewsIs it possible to add properties to the css file created by the angular build?
My angular build generates a stylesheet addition in the index.html as follows: <link rel="stylesheet" href="style-1.css"> <link rel="stylesheet" href="style-2.css"> You can configure it…
-
4
votes2
answers86
viewsWhat is the difference between paths starting with ". /" and "~/" ? What is a best practice?
Both directories below point to the same file. These are Typescript import statements in an Angular application '~/app/shared/sevices/modules-services/inspections/checklist.service';…
-
4
votes1
answer239
viewsDownload File via API + Lumen + Maatwebsite Excel
I have an Angular 5 application that requests the backend made in Lumen 5.6, in this backend, I have a function that creates an excel file, with the Maatwebsite Excel library, for download. However…
-
4
votes1
answer9398
viewsAngular 6 ngFor
They can explain to me why the ngFor directive is triggering the "triggerTeste" function twice, and the array called "items" to which it is traversing only has stored 1 object type element.…
angularasked 6 years, 2 months ago Cleriston Martins Cardoso 107 -
4
votes1
answer800
viewsHow to access Httperrorresponse data (error.Message) by Angular 2 (7)?
Code Component.ts delete(i: number) { this.formConcluido = false; this.formConcluidoErro = false; this.cidadeDeletar = this.cidades[i]; this.cidadeDeletarId = this.cidadeDeletar.Id;…
-
4
votes4
answers4308
viewsLoad component only after finishing HTTP requests
My application uses angular-6-json-schema-form to create and manage forms dynamically. Now I would like the select Component, for example have your data coming from some REST source: My attempts:…
-
4
votes0
answers1533
viewsAngular2+ ngx-Mask deleting value in dynamic mask change
I have a document field where the value can be CPF or CNPJ. <label for="cnpj" class="label-control"> <select class="labelSelect" name="tipoDoc" id="tipoDoc" [(ngModel)]="tipoDoc">…
-
4
votes1
answer182
viewsHow to improve angular performance with webpack or demand loading?
I have a large project with angular and need to leave the pages loading with a good performance, at first I set up a Customized Webpack for the application. But by applying it the downloaded files…
-
3
votes1
answer499
viewsForce Javascript File Version Update
I am developing an application in Angular2 and I am facing a problem which is updating the files JS. When I update the version sometimes the browser does not load the new file, it uses the old one.…
-
3
votes2
answers419
viewsRequest loop in Angularjs 2
I am new to the use of Angularjs and decided to study based on a work project. My problem is this: I am building a base project using Angularjs 2 to consume data from Wordpress (WP) through the REST…
-
3
votes2
answers1358
viewsWhat is the .component.spec file for at angular2
I am using the angular cli in my project, and when generating a Component, it automatically creates a .component.spec.ts file. Can anyone tell me what this file is for. spec? I really need it or I…
-
3
votes1
answer722
viewsAngular Material Datepicker does not work
I have studied programming Frond-End and I took several tips from friends on Angularjs and refer me some demo sites of Angularjs, at the moment I am trying to implement Datepicker and I am not…
-
3
votes0
answers2995
viewsValidate CPF and CNPJ
Does anyone know of any CPF and CNPJ validators for Angular 2? I saw a package for Angular 1 as directives, the implementation is the same? package link…
-
3
votes2
answers981
viewsAngular2 ngFor help with loop
I have a file nvi.json that is this way: [ { "abbrev": "gn", "book": "Gênesis", "chapters": [ { "1": { "1": "...", "2": "..." } }, { "2": { "1": "...", "2": "..." } }, { "3": { "1": "...", "2":…
-
3
votes1
answer860
viewsManipulate DOM at angle 2
I’m passing a web system that has Jquery to Angular 2. I have a button that when clicked it adds two inputs and together with them is created a button to delete these inputs. ( follows the code in…
-
3
votes1
answer508
viewsHow to show "loading" screen
Good afternoon, I am beginner in the angular and I have the following doubt: It is possible to have a selector accessible in all my components? I bring my component as follows: import {…
-
3
votes0
answers617
viewsHow to make an Ionic Collapse?
I’m trying to make a collapse and it’s like this: HTML <ion-content> {{topical.}} <ion-item *ngFor="let aulas of topicos.get_classes" [hidden]="deixainvisivel" menuClose ion-item…
-
3
votes1
answer1314
viewsAngular2 - Inject Component to Body
Good afternoon! I have the following component import { Component, Input, ElementRef, HostListener, OnDestroy, OnInit } from '@angular/core'; /** * This class represents the navigation bar…
-
3
votes1
answer649
viewsaccessing class data in a function in the global scope with typescript
I’m developing an Angular 2 application and I’m using the Youtube API. The Youtube API requires me to implement some functions in the global scope, so I did the following: export class MyClass {…
-
3
votes1
answer378
viewsvalue the angular input 2
I have an object coming from the bank that I show in the view on an ngFor. what I want is to pass this [value] to the component to save in the bank and I’m not knowing how. <form #f="ngForm">…
-
3
votes1
answer1363
viewsLaravel and Front-End
Well , I wanted the opinion of some dev’s who have gone through the same dilemma I’m going through right now, I don’t know if this is the right channel to realize this question. I have to build an…
-
3
votes0
answers817
viewsVariable me returning Undefined which is assigned inside subscribe
In the code below, the variable date is returning me Undefined, now if I put console.log(this.data); inside subscribe returns me with the correct value. import { Component, OnInit } from…
-
3
votes2
answers444
viewsHow to work with Primeng Editor?
Look at the link Edidor Primeng Would anyone know how to disable or remove the image upload button…
-
3
votes1
answer305
viewseffect with css Transition in Angular
Well I’m using a Progress-bar whenever I’m loading some data on the page. To stay cool I’m trying to put an effect for when she shows up and disappears. But the effect only works when it is hidden,…
-
3
votes1
answer183
viewsNavigation by Id Ionic 2
hello. I am developing an application with Ionic 2 and I am with the following situation. I have 2 tables, 'stores' and 'publications'. My question is, how to do from the 'store' listing to open…
-
3
votes0
answers2259
viewsError 403 disallowed_useragent, when logging with google in mobile browser using angularfire2
Hello, I am using the angularfire2 v4.0.0-rc.2 package in an angular4 project published in firebase. I integrated the logins of facebook and google and both are working perfectly in the browser of…
-
3
votes2
answers1048
viewsHow to understand MVC architecture at Angular 4?
I studied the Angular Js 1.x and I was able to understand perfectly where the architecture fits MVC in the framework, but I didn’t feel the same Angular 4. Yeah, I know, that’s pretty crazy, but…
-
3
votes3
answers5520
viewsHow to install Jquery in Angular?
What is the correct way to install jquery in an angular project 2+? Bootstrap: npm install --save jquery@latest Only it is not available in node_modules for me to take the path and put in…
-
3
votes1
answer2946
viewsAngular with Typescript or Javascript?
Researching a little about Angular (v 2+) saw that in many places it is commented that Angular has support for Typescript and that its use is more common than pure Javascript, so what are the…
-
3
votes2
answers4339
viewsDifference between start date and end date with Moment js
I need to inform how much time I have of a certain chronometer, I have the date of the moment at which I started the event. I’m developing with angular 4 typescript and use plugin Moment js In my…
-
3
votes1
answer733
viewsResponsive design in 2+ angular
Is it possible through the 2+ angle to get the size and width of the browser and from there send this data to the css in order to make it responsive? Is there any other way to leave responsive…
-
3
votes1
answer32
viewsLine changes color when value is false
I have a list of users and each user can be inactivated or activated. I would like the user when 'false' (disabled) to change the color to gray. HTML: <tbody> <tr *ngFor="let user of users"…
-
3
votes1
answer858
viewsHow to use Ngmodule modules and decorator?
I have doubts about how to use the decorators of NgModule. What they are and what they’re for? How to create a separate module to load one or more libraries and components? For example, one to load…
-
3
votes2
answers54
viewsAngularjs and angular 2, 4,6
I can still use the Angularjs? I want to use it for the simplest thing, example is to filter a list, and I don’t want to install npm, nodejs, angular CLI or use MVC structure for this. I can use it…
-
3
votes1
answer868
viewsAngular Interceptor 5 is not triggered
Follows my code: app module.: import { APP_BASE_HREF } from '@angular/common'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from…
-
3
votes2
answers1305
viewsParent component receiving child component data
It’s kind of confusing what I want more come on I have my parent component that contains some buttons and a search field, and I have my kids components, I want to implement the function of the…
-
3
votes2
answers472
viewsHow to read a JSON file dynamically? (ANGULAR 2)
For example when starting I want my program to load all messages previously stored in a JSON file (message.json) ngOnInit() { this.emissor = 'Victor';…
-
3
votes1
answer8960
viewsValidate CPF at Angular 5
Dear, I would like to know how I can validate CPF in angular 5, I have done several searches but so far nothing. I’ve already been able to perform the e-mail validation. Could you help me?
-
3
votes1
answer55
viewsThere is performance difference using ngIf directly on a component
Hello, Could someone tell me if there is a difference in performance in the code snippets below, and if there is, what would be the most performative? Thank you!! <div *ngIf="false">…
-
3
votes1
answer1234
viewsIonic-Native/http emits error "Nullinjectorerror: No Provider for HTTP!"
I’m starting at the Ionic 3.2 angled, as documented https://ionicframework.com/docs/native/http/ I installed the module in the project @ionic-native/http with the following commands via CMD: ionic…
-
3
votes2
answers124
viewsUnit tests for Pipe tap() in Angular
I would like to test tap() inside my Pipe to cover this code snippet, just missing it so that I reach 100% test coverage. fromEvent(this.input.nativeElement, 'keyup') .pipe( debounceTime(150),…
-
3
votes1
answer257
viewsHow do I periodically trigger a function to update data in each instance of the Angular 5 application?
I need to have a data list updated every 5/10 minutes, this data which is brought from a Spring Boot API with Mysql storage, through a request made by Angular. I would like to know some way to keep…
-
3
votes2
answers1134
viewsHow to get an Observable from an array item?
Working with Observable and Rxjs, I came across the following problem. At a certain point in the code, my access to the bank is done as follows: getExemplo(id: number):Observable<Exemplo>{…
-
3
votes1
answer496
viewsRequest arrives null on C#
I have a request that’s being made this way at angle 5. enviarEmail(titulo: TitulosCobranca, unidade: UnidadeEmpresa) { let param: any = { titulo: titulo, unidade: unidade } return…
-
3
votes1
answer216
viewsWhy do we use the type "Static" in a function in Typescript?
Why do we use the word static in a function in Typescript/Angular? Is she a type or just a reserved word? How can we refer to her? Example: export class ClasseExemplo{ static fazerAcaoComponent() {}…