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
votes0
answers42
viewsHow to do if not repeat the function for anyone who has already reached a number
I make a BD call through the API to see the sales percentage data of the branches of a store, and if the percentage is greater than or equal to 100% I should play a song and change its color to…
-
0
votes0
answers20
viewsDifficulty finding list in Angular?
Take a good look at the image below; In my class of services it was like this; pesquisar(): Promise<any> { return this._http.get(`${this.url}/menus` ) .toPromise() .then(response => {…
-
0
votes1
answer37
viewsPass an id through a checkbox at Angular 5
I need to pass an id through a method in a form when my checkbox is checked. I have tried it in several ways with no results. Below follows the code {{Event.name}} <div class=" col-3…
-
0
votes1
answer75
viewsSaving data in Angular API
I need to save a data set through an API. I tried to pass the data in several ways but did not succeed. Always gives the error: ERROR Error: Uncaught (in Promise): Httperrorresponse:…
-
0
votes0
answers45
viewsHelp with Eventemitter - Angular
I’m unable to broadcast one event to another, someone could help me ? Basically what I’m trying to do is that when I save something in Component 1 it sends the event to Component 2 so that the…
-
0
votes0
answers95
viewsHow to access return of an Eventemitter object created from http.get
I have a service that performs a get at a certain address. @Injectable({ providedIn: 'root' }) export class PersonService { private person: Observable<Person>; personBroadcast = new…
-
0
votes1
answer634
viewsWhy does the app.component.css file not work in Angular?
When we execute in Angular the command ng g c page --spec=false it creates a component composed of four files, an HTML file, a module file, a CSS file and a file TS as shown in the figure below, in…
-
0
votes2
answers535
viewsIdentify numbers and letters typed in input fields with typescript
I want to make an alphanumeric validation being mandatory the use of uppercase letters and numbers typed in an input using typescript. I need to know when a capital letter is typed, for example nAbd…
-
0
votes1
answer95
viewsAngular - HTTP Interceptor returns the value of a promisse
I have to apply a descriptografia on the return body of a request via Interceptor, but the method of decryption is asynchronous and returns a promisse. Follow a section of the class: intercept(req:…
-
0
votes2
answers1557
viewsProblem when integrating Jquery, bootstrap and Popper.Js scripts at angular 6
I have a problem integrating bootstrap.js, Popper.js and jquery.js scripts into my Angular project. I’ve made some attempts, but nothing has solved so far. My scripts are being embedded as follows:…
-
0
votes1
answer226
viewsHow to access the Styles.scss file from within an Angular component
I am working with Angular (project generated by @angular/cli), and the structure of my project is below: src | - app | - foo | - foo.component.js | - foo.component.scss | - foo.component.html | -…
-
0
votes0
answers147
viewsNavigability button does not work in Angular
Take a good look at the image below; This test just above was done in a file HTML with CSS, and it’s working perfectly, but I did the same test in an Angular project with the same code and it didn’t…
-
0
votes1
answer1294
viewsHow to transform the observable of json into datasource for Angular Material 2
It is returning normally from the database, but when it passes to datasource it is empty Component import { Component, OnInit} from '@angular/core'; import { Tcp } from '../tcp'; import { TcpService…
-
0
votes2
answers136
viewsError attaching Angular4 file
I’m trying to get a file attached through a button. The problem is that the file arrives but is not setting, as shown in the images below, just below the images has the method and the html button.…
-
0
votes1
answer119
viewsReturn to incorrect IF condition
I make a request in the api to get some data, and then I foreach and give the result for a variable this.DadosQueTaNaTela soon after I make another request in another api to take the data and do a…
-
0
votes1
answer1353
viewsHow to import css in Angular 6?
I noticed that from Angular version 4.3 to Angular 6 they removed the file .angular-cli.json, because of this I am including in the main file of the project the index.html, but the Font-Awesome…
-
0
votes1
answer226
viewsSyntax Error in MAP Angular6
I’m on a course of angular 4, but I’m using the 6, it makes me feel good, but once in a while there are some things that don’t work, I managed to fix most, but there’s one that makes me crazy that…
angularasked 6 years, 2 months ago Gabriel Ramalho Grotto 37 -
0
votes0
answers55
viewsAngular Compiler was Detected but it was an instance of the Wrong class
I am currently working on a project, consuming a Rest api from the angular, but in the process, I am encountering an error that is returning me that I have 2 webpack packages within my application.…
-
0
votes1
answer52
viewsHow to assign a Json font within an interface
I am trying to generate an interface of a Json file but this error, what would be the error in my code? export interface Compra { event: string; timestamp: number; custom_data: number; value:…
-
0
votes1
answer765
viewsCORS problem when making GET call at Angular 6
When I call the following URL: https://script.google.com/macros/s/AKfycbxk616n8wjgGeHZIc3Hm66Kcv4ZtWKZJQnEKLsxZC9LpoDK8mQZ/exec directly in the browser or in POSTMAN I get JSON correctly, but when I…
-
0
votes0
answers68
viewsHow to consume a Json data by coming to an http address
I’m trying to consume a Json data coming from an http address, but I don’t know what’s going wrong. I divided the question into two groups my other doubt import { ComprasService } from…
-
0
votes1
answer112
viewsRedirect page after login
I’m trying to redirect to the homepage after logging in, but the system won’t log in Test code I made for demonstration is this: ngOnInit() { this.loginForm = new FormGroup({ login: new…
angularasked 6 years, 2 months ago adventistaam 3,354 -
0
votes1
answer937
viewsAdd and remove classes in Angular
I have a card that will appear on certain occasions. As an effect I am using the bootstrap design material to give a Zoomin. I am using ng4-clickout to when click out of my element it apply the…
-
0
votes1
answer21
viewsDoes precedence in attribute/event statements in Tags make a difference? Angular2+
I work with Angularjs and Angular2+ almost two years ago and recently, in Angular2+, I came across a different situation that made me wonder if it was a coincidence or because of the version of…
-
0
votes1
answer1734
viewsHow to insert <script> in angular? Simple HTML works!
Guys, my . html Component is like this: <script> window.onload = function () { var chart = new CanvasJS.Chart("chartContainer", { animationEnabled: true, title:{ text: "Monthly Expenses,…
-
0
votes1
answer645
viewsAngular 6 How to leave default field in select?
I’m trying to leave one of the option elements as Selected, but I can’t get it to work at Angular 6. app.component.html: <select [(ngModel)]="marcaSelecionada" class="form-control" name="marca"…
-
0
votes1
answer31
viewsLink breaking by typing directly into the browser
I am developing an angular project that is breaking the link when it has parameter and is typed directly in the browser, only occurs when it is published in IIS, if I do the same in the published in…
-
0
votes0
answers228
viewsExpressionchangedafterithasbeencheckederror: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'
This error happens when an event call is made onblur() in component.ts: Error procedure: When performing a registration, entering data in the first field CODE, with only 1 digit, it accesses an…
-
0
votes1
answer23
viewsForm Builder in Dropbox element
I have the following form group: createFormGroup(): Formgroup { Return this.fb.group({ Description: ''' value: '', sku: ' guy: '', }); } where: 'type' should come the value of the dropdown. My drop:…
-
0
votes1
answer67
viewsHow do I update the amount of socket.io messages in an Angular Ionic3 app to a particular endpoint?
I want to implement an icon in a view that brings the amount of messages a user has in their box, but the update of quantity information should occur in real time according to the model below…
-
0
votes2
answers475
viewsForm group does not update angular template
I am using formgroup and need to fill in the fields of my formgroup receiving data from an array. I tried something like: My Form Group: produtoForm = this.fb.group({ nomeproduto: [''], valorcompra:…
angularasked 6 years, 2 months ago veroneseComS 2,752 -
0
votes1
answer93
viewsHow to reuse snippets of code in Typescript in Ionic 3
On one of my pages, when the user clicks the button Delete an Alert is displayed requesting confirmation. This action exists on more than one page, to avoid duplicating code, how can I reuse the…
-
0
votes1
answer118
viewsHow to work with the 'Camera' plugin to allow image upload when in a browser?
I’m trying to implement a feature that allows me when in the browser, upload images, already on a mobile device, I will have the options to take a photo or choose an image from the gallery. Taking a…
-
0
votes1
answer236
viewsSum returns NAN even when converting the number to angular
I have a repeating structure that should add some values: The variable qtdeEstoque was defined as number and the variable variacaoForm.value.variacoes.estoque_variacao is a number, but when I try to…
-
0
votes1
answer972
viewsHow to add data to the JSON file in Angular 6
I have a code that sends and receives messages. I can read a local JSON file With this code in ngOnInit I can read what is inside the JSON file and turn it into a message that is displayed on the…
-
0
votes0
answers104
viewsMy HTTP(GET) request is not running on ngOnInit() - Angular 6
I have a CRUD at Angular 6 that connects to Node and mysql. When I access the homepage the getQuotes() function loads all the data I need. When I access the screen to update a record and perform…
-
0
votes1
answer111
viewsMy directive does not work in Angular
I have the following directive: import {Directive, ElementRef, Input, Renderer} from '@angular/core'; @Directive({ selector: '[tipo-coluna]', }) export class TipoColunaDirective { @Input()…
angularasked 6 years, 1 month ago veroneseComS 2,752 -
0
votes1
answer710
viewsPassing data to a modal
I’m trying to pass data to a modal. I believe I got the first part, because on Chrome’s console I see that I received this data, but I don’t know what’s wrong, that I’m not being able to see them on…
-
0
votes2
answers1947
viewsHow do I manipulate 3 Checkbox in Angular 2?
I have 3 Checkbox. The first option is bread, the second option is fish and the third has salt. I want to use Tamplate Forms and not reactive Forms. Can someone help me? <form #form="ngForm">…
-
0
votes1
answer68
viewsConvert Json data (2018-09-20 15:58:38) to (20/09/2018 15:58:38)
While developing an app at the angle, I get a json with values and date. I need to display the date in the.html payment list in the format dd/mm/yyyy. How can I do ? Listapagamento.ts import {…
angularasked 6 years, 1 month ago alexjosesilva 3,119 -
0
votes1
answer782
viewsERROR Typeerror: Cannot read Property
I have to click a button on an html page and trigger a function in the Component.ts called methodThis, but I’m getting an error message (error image) front image Component. import { Component,…
-
0
votes1
answer902
viewsHow to pick up the text of a select with formBuilder? - Angular 6
I would like to take the value of the text and not the value of the select. <div class="form-group col-md-3"> <label for="ProductName">Product Name</label> <select…
-
0
votes1
answer1462
viewsHow to make a function wait another function that has an subscribe with observable in?
Next, I have a function that generates a PDF, this function takes a mounted array and mounts a page. After that she requests the next page for the backend through a function with a subscribe. My…
-
0
votes1
answer37
viewsAngular: Problems with Touchevents
I need to detect a touchstart, one touchend and a touchmove to make a selection of days as the user drags his finger on the screen. However touchmove apparently not made for this purpose. As an…
-
0
votes1
answer3539
viewsChange CSS property in Typescript (Angular)
I have a list that when I click on it, I need the display: listview be exchanged for display: none. My list is composed this way: <li class="sub"> <a class="dropdown-item waves-effect"…
-
0
votes1
answer106
viewsHow to add values in keyup using angular?
I have a field that I need that as I type values, it adds in a variable. I tried something like: <input (keyup)="somaEstoque($event)" #inputestoque type="text" name="estoque_variacao{{i}}"…
-
0
votes0
answers282
viewsDefault option in select does not appear
I have a select I want to show a label as default option, but it is appearing blank. My select: <div class="select"> <select (change)="calculaMes(mesEscolhido)" [(ngModel)]="mesEscolhido"…
-
0
votes1
answer45
viewsngFor generating many calls
I have an array that contains 40 positions. By making an ngFor using this array, I create a series of components within this *ngFor. The problem is, it’s killing the performance. Debugging, and…
-
0
votes0
answers21
viewsAngular animation only works in the "enter" transition
I’m trying to put a fadein/fadeout effect, but it’s only working the fadein, when it happens the element disappears instantly. I tried to: @Component({ selector: 'app-confprecificacao', templateUrl:…
-
0
votes1
answer1608
viewsInterface dependency injection in Typescript - Angular 6
I am doing the front end of a project using Angular 6, but I am beginner in both Angular and Typescript and I am trying to use the interfaces of Typescript as in Java, injecting them to use the…