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
votes2
answers200
viewsRoute guard on the Ionic possible?
I am currently securing my routes in ngOnInit, if you have the token key in localStorage, then it remains on the Home route (My root route is home). Otherwise, it redirects to the login screen. The…
-
0
votes0
answers597
viewsHide menu items using Routes
I want to get information like the menu for a different route, for example, the customer "Mkt Place" is not seen as "Seller" customer options, provided by the menu when the user enters the login in…
-
0
votes1
answer218
viewsTwo on-change in a select
Good morning, I have the following html code: <select class="form-control" formControlName="tipoped" on-change="PesquisaPrazo('prazo', this.digitacaoForm)"…
-
0
votes0
answers146
viewsMessage when mouse on disabled button in angular
I would like to see a message that has to fill in the required fields when you pass over the disabled button at the angle. Currently I have: <button (mouseover)=testefunction() type="button"…
-
0
votes1
answer28
viewsHow to disable Angular comments
I’m starting to study Angular (current version) and I checked that after all the codes are compiled, the development information comments I put in the archives .ts are replicated to the files .js…
-
0
votes3
answers1235
viewsGroup an array of objects
I am trying to group an array of objects that comes from the database in the following format: [ { '12312312': { 'first_name': 'David', 'id_question': 0, 'acertou': 1 }, '23423423': { 'first_name':…
-
0
votes1
answer1710
viewsProblem with more than two router-outlet in the app
[...] <header> <a routerLink="/lista-empresa" href="javascript:;">Empresa</a> </header> [...] <main> <router-outlet name="conteudo"></router-outlet>…
-
0
votes0
answers559
viewsInstantiate class on application start
I would like to know if it is possible to instantiate a class and use it throughout my application without having to instantiate it and import it. I have my app.: import { Component, OnInit } from…
-
0
votes1
answer47
viewsSend data to angular guardians
I need to make a Guard to check if a user has permission the system screens. I have an array saved in localstorage that informs me the permissions of a user. Example: [1,2,5], where the number is…
-
0
votes0
answers547
viewsHow to get http data and show on screen with Angular 2+
I’m having trouble getting an angular request backend is returning right but I’m not able to put the variable in html. app.compoonent.ts import { Component } from '@angular/core'; import { CanLoad,…
-
0
votes1
answer628
viewsI’m not getting to use a module
It turns out I’m trying to use a module and I’m not getting from this error below: Uncaught Error: Unexpected directive 'BordaCreateComponent' imported by the module 'AppModule'. Please add a…
angularasked 6 years, 10 months ago Ederson Coelho 143 -
0
votes1
answer1067
viewsPercentage mask at angle
How can I make a percentage mask using angular 2+? I want to apply it to my input: <input type="text" [(ngModel)]="produto.indice_lucro" name="indicelucro" id="indicelucro"…
angularasked 6 years, 2 months ago veroneseComS 2,752 -
0
votes2
answers132
viewsCast Typescript ( ERROR Typeerror )
The problem is this, through a service(ModeloService), receive an array of Modelo, where Modelo is a class, it turns out I’m not getting access to the methods of this class, because the cast in the…
-
0
votes5
answers1024
viewsHow to get last position of an ID in the array
Hello, I have a function that captures coordinates of elements that I move on the screen with the mouse. But this function of mine, it takes the trace of the coordinates of the elements that I drag,…
-
0
votes1
answer187
viewsRoute Problem at Angular accessed directly
I published the Angular project on a machine with IIS, but when I try to access the link with a route directly shows error 404, example "http://meusite.com/appiis/login" but access the url…
-
0
votes1
answer356
viewsHow to handle DIV with angular 2
I have 2 Divs and would like to manipulate them with buttons. I have 2 Divs. When one appears the other is hidden, vice versa. Can someone help me ? My version of Angular is 5. Function1 Function2…
-
0
votes1
answer222
viewsExtract Data Elements from 2 API
The data of the two Apis comes in my console, the problem is that in the html in *ngFor it is only possible to scan the elements of the 1st subscribe that I store in dados, would like to store the…
-
0
votes1
answer636
viewsHow to filter an Observable?
How to filter a Observable returned from Cloud Firestore? export interface Pessoa { nome: string; cidade: string; telefone: string; } pessoaList: Observable<Pessoa[]>; I have the method below…
-
0
votes1
answer52
viewsFlip over elements Collapse
I have an element that I want to turn it as I click on it, this element is a Collapse: <td><a class="fa fa-chevron-down iconedetalhes" data-toggle="collapse" href="#collapse{{i}}"…
-
0
votes0
answers301
viewsRemove quotes from a json string with replace typescript
I need to remove the quotes from a string I receive in json, for this I am creating a pipe, but I am not able to remove double quotes. I tried something like: @Pipe({ name: 'prettyprint' }) export…
-
0
votes1
answer480
viewsAngular 2 image Base64 how to use?
I have a "ERR_INVALID_URL" error and does not load the image. Does anyone know how to solve ? My html and Ts are like this. //Aqui está vindo a url do servidor let a = value.params["dataBuffer"];…
-
0
votes1
answer333
viewsHTML Binding Angular 4
Good afternoon, I need a hand with Angular 4 I have the following method: import { Component, OnInit, Input, Output } from '@angular/core'; import { Remedy } from '../remedy/remedy.model' import {…
-
0
votes2
answers723
viewsImplement function in child element
I have my template on a parent element and my child elements extending the parent element class. import { Component } from '@angular/core'; @Component({ selector: 'ngx-cadastro', template: ` <div…
-
0
votes1
answer2882
viewsHow to get value from Response
I’m at an impasse when it comes to getting a JSON of my return that I can’t read it in any way I’ve tried in several ways I will show below how the code is now and what I need to do. My Component…
angularasked 6 years, 10 months ago Ederson Coelho 143 -
0
votes1
answer41
views'_$visited' property in Javascript object at the return of Obervable’s map() function
I have a Webservice implemented with JAX-RS and I’m consuming it with a service(utilizando Angular 2) Follow the service: @Injectable() export class ModeloService { constructor(private http: Http) {…
-
0
votes0
answers127
viewsHow to add another exception rule in Angular?
Before showing my problem I would like to inform you that my form is able to insert records in the database, I created an exception in my java API, the error message in the figure below is expected,…
-
0
votes1
answer381
viewsTake Angular Datepicker value
I wanted to take the value of data picker in my component.ts angular. It follows my code data picker: <div class="form-group col-md-6 form-md-line-input" style="margin-top:-95px;">…
-
0
votes2
answers2054
viewsFormat Angular Date
Hello, I have the following string: Tue Oct 16 2018 00:00:00 GMT-0300 (-03) And I wanted to format it into dd/mm/yyyy and my goal is to stay 16/10/2018 How I would have to do this formatting…
-
0
votes1
answer109
viewsPass function by two way data bind
I was wondering if it’s possible to pass a function through two way data bind angular. I will try to explain, I have a component with 3 buttons and I would like to use them in several parts of my…
-
0
votes1
answer502
viewsHow to pass values from a list in Ionic3
Talk guys, I’m breaking my head with something "presently" simple, more not so much... I have a simple json with id and name, with approximately 25 records, I have to take only the records selected…
-
0
votes1
answer111
viewsSave a function’s results to an Ionic variable 3 + Firestore
How to save the result obtained in r.get('Quant') in a variable and return its value, because the first console.log shows the data I obtained, but the second does not, and the Return Quant always…
-
0
votes1
answer127
viewsng-change with dynamic object
Good morning, I’m using angular 2 and I’m having difficulty using the property 'ng-change' after I dynamically Gero the object below: <input type=text class="insert" id="input' + data.id + '"…
-
0
votes3
answers635
viewsAdd data from array
I have an array that data comes from the user’s filled form and make a map: dados.map(element=> { var x var number1 = parseInt(element.preco), number2 = parseInt(element.peso) var tota = number1…
-
0
votes1
answer1356
viewsHow to create components in Angular?
Look at the structure of the project The page estilo-cadastro.component.html is found that way as you can see below. <div class="container"> <form #f="ngForm" autocomplete="off"…
-
0
votes1
answer360
viewsHow do I refresh the Angular Primeng Automatic Dropdown?
Be able to implement a Dropdown in a registration form as you can see in the figure below in the field Style; If you stop to observe in the right corner of the field has an icon, when clicking on…
-
0
votes1
answer4161
viewsHow to apply console.log at the angle?
I want to apply console.log in the angular method, but I’m having difficulty, I’m doing so; export class CervejaService { cervejasUrl = 'http://localhost:8080/cervejas'; constructor(private http:…
-
0
votes1
answer475
viewshorizontal ion-card
Has some form of ion-card grow horizontally and not vertically? It is populated by data that comes from the api <ion-card *ngFor="let filmes of lista_filmes_popular"> <img…
-
0
votes1
answer65
views -
0
votes1
answer226
viewsHow to apply javascript events to Angular?
I’m having a huge difficulty applying Javascript in my Angular project, I hit the setup to connect javascript in the project, but come on... This is the Javascript file; var Brewer = Brewer || {};…
-
0
votes0
answers2096
viewsUpgrading Angular CLI to the latest version?
I started a new angular design, it works well for me when I use: npm start However, I’m trying to use ng serve So I tried that: npm uninstall --save-dev angular-cli npm install --save-dev…
-
0
votes1
answer1131
viewsAngular: Adding array in formBuilder or otherwise
I need to add an array to formBuilder, but I don’t know how to do it (it may be in other ways). everything was going great until FK showed up. I have to send the company data plus the phone data…
-
0
votes1
answer85
viewsView in ngModel Firestore return
How to view data returned from the Firestore in an Angular ngModel directive? I would like to take the data that is returned from the Firestore and display in an Angular ngModel directive,…
html firebase typescript angular angularjs-directivesasked 6 years, 9 months ago Luiz Ricardo Cardoso 173 -
0
votes0
answers170
viewsRequired Multipartfile Parameter 'file' is not present when I make a request through Angular 4
I can make a file upload request through Postman, but when I make the Angular request, WARN is returned "Required Multipartfile Parameter 'file' is not present" Follow my API feature made in Java…
-
0
votes0
answers31
viewsProblems running Widfly 14
I am taking a course where I create a client register, but at the moment I will run the server Widfly 14, I have the following error: Can you help me please?…
-
0
votes1
answer100
viewsHow do I work with Arrays using Angular 5 in the log console?
I’m trying to implement a Multiselect Dynamic dropdown on Angular, it’s like it’s selecting state according to cities, if I select for example PE in the first dropdown list to it will return me…
-
0
votes1
answer55
viewsExecute a method on an HTML element without using the click event
Good evening, I have a radio button in a form, where it is only called when it meets the condition of a *ngIf, however, when ngIf is accepted and this element is called, I need a method to be…
-
0
votes1
answer40
viewsHow to limit subscribe to just one loop
I need to display an Alert every time my main Component changes route, so I created the following script in my AppComponent: constructor(private router: Router) { router.events.subscribe((val) =>…
-
0
votes1
answer208
viewsProblems implementing Dropdown Waterfall List with Angular 4?
As the title says, I’m having difficulty implementing the Dropdown Cascade, it’s about loading the first Dropdown with the state and the second Dropdown will be automatically loaded according to the…
-
0
votes0
answers51
viewsAbout variable typing performance in functions and variables in typescript
There is some difference in typescript performance when using variable typing compared to any? Example: minhaString: any; minhaString: string; I would also like to know if there is a difference in…
-
0
votes0
answers60
viewsAngular Authentication 2 - Java Servlet
I have a problem using an API to which I can not make changes, it happens as follows, I have a Folder extending from a security library, that library is in charge of making the logins, allow the use…