Questions tagged as 'angular'

1
answer

can not assign to property "validator" on "selectAnimal": not an object "

I'm trying to apply a mandatory validator when filling a select, but I'm getting:    can not assign to property "validator" on "selectAnimal": not an object " Follow my code: ngOnInit() { this.firstFormGroup = this._formBuilder.group...
asked by 10.11.2018 / 14:06
1
answer

Wrong icon in angular stepper mat

I'm trying to put an edit icon when the state is address, but the icon shown is from the first state. I've tried: First step: <ng-template matStepperIcon="edit"> <mat-icon>home</mat-icon> </ng-template> <...
asked by 10.11.2018 / 19:12
0
answers

My routing module can not find my component

I'm trying to apply lazy loading in my application, but for some reason I'm not finding the component import I make in my component's routing file, returning:    Uncaught Error: Component CustofixesComponent is not part of any   NgModule or t...
asked by 22.11.2018 / 13:35
0
answers

Angular 6 using ChartJs creating dynamic charts how to reference the canvas?

I need to create a chart for each product, and I do not know how many products have in the array in advance. So, in the template I'm dynamically creating the canvas like this: <div *ngFor="let item of Grafico; let i = index"> <canva...
asked by 08.11.2018 / 15:48
0
answers

Hide select option when it is equal to the already chosen option

I have a select that has two options: Size, Color. When I select Size, when I click again on my select, it still shows Size as an option. I would like to remove it and leave only the other available, as it has already been selected....
asked by 08.11.2018 / 16:08
0
answers

Select a radio button automatically from the value of another radio button

Good afternoon, I'm working on a non-angular project. In this project I have a form with several radio buttons, where each group of radio buttons represents a scale. What I need to do is, check the values of the selected radio buttons, and from...
asked by 08.11.2018 / 18:38
0
answers

Dynamic selection box in form (select)

I have a question here, which is as follows: in a form I will have 2 select boxes, the first box is free and the second box the options inside it will vary according to the first check box. I used ngIf and ngTemplate, but I could not make it app...
asked by 07.11.2018 / 15:49
1
answer

Execute a method in an HTML element without using the click event

Good night, I have a radio button on a form, where it is only called when it meets the condition of an * ngIf, however, when ngIf is accepted and this element is called, I need a method to execute without you need to click any button. Here are m...
asked by 15.11.2018 / 21:54
0
answers

Check JSON result in Login with Angle 2x

My service to enter has: entrar(data: any): Observable<any> { console.log(data.email, data.senha); return this.http.get('${this.baseUrl}/' + '?email=' + '${data.email}' + '&senha=' + '${data.senha}'); } And my login componen...
asked by 27.11.2018 / 16:42
0
answers

Angle Error TypeError: _co.disable is not a function

I would like to understand what is causing this error in my application. Here are the codes: desabilitar(elemento){ var radio = document.getElementById(elemento) as HTMLInputElement; radio.checked = false; } <mat-radio-button class="marg...
asked by 15.11.2018 / 15:10