Posts by veroneseComS • 2,752 points
368 posts
-
0
votes1
answer48
viewsQ: Start radiobutton with checked using Reactiveforms + Formarray
Is there any way to start my radiobutton with checked? I’m using Reactiveforms with Formarray and I need the first element to be created in formArray to be already checked. What I tried to: HTML:…
-
0
votes0
answers75
viewsQ: Use Helium to discover unused css classes in Angular
I’m trying to use the Helium to discover unused classes in my css. I imported it into my index.html: <script type="text/javascript"…
-
0
votes1
answer52
viewsA: Json-server is not saving all data when performing POST
Solved when I switched from "form-data" to "x-www-form-urlencoded"
postmananswered veroneseComS 2,752 -
0
votes1
answer52
viewsQ: Json-server is not saving all data when performing POST
I got the following database high: { "clientes": [ { "id": 1, "nome": "xxx", "cidade": "Orlândia" }, { "id": 2, "nome": "yyy", "cidade": "Franca" }, { "id": 3, "nome": "zzz", "cidade": "Franca" } ]…
postmanasked veroneseComS 2,752 -
0
votes1
answer121
viewsA: Mat-Angular-Stepper how to go to the next step through typescript?
I was able to add the following local variable #stepper: <mat-horizontal-stepper [linear]="isLinear" #stepper> And then on my form, on onsubmit I passed Stepper as parameter: <form…
-
-2
votes1
answer121
viewsQ: Mat-Angular-Stepper how to go to the next step through typescript?
I’m trying to give the next through a function. I saw in the documentation that they possess the method next() But I tried to stop both the matStepper as to the matStepperHorizontal in my…
-
1
votes1
answer66
viewsQ: My input suggestions are tracking the screen movement
My input suggestions are moving together with the screen, I would like when moving the screen the options are hidden. This happens in all my inputs: #linhaGeralDash { margin-top: 2%; padding-top:…
-
0
votes0
answers62
viewsQ: Does the angular renderer2 have any method to click on an element?
I have a modal bootstrap that at some point of my TS code I must close it. Currently to close this modal I use a local variable in the close button of the modal and use viewChild to click on it:…
-
0
votes1
answer108
viewsA: How to sort more than one table with Angular matSort
I managed to change my function sortData to the following form: sortData(sort: Sort, indexTabela: number) { const data = this.anunciosB2w.Contas[indexTabela].Anuncio.products.slice();…
-
0
votes1
answer108
viewsQ: How to sort more than one table with Angular matSort
I have the array object this.sortedData: An *ngFor is applied in the Accounts array, as you can see in the template, each Accounts position will be a table: <div *ngFor="let tabelaAnuncioContas…
-
2
votes3
answers530
viewsQ: Find an object in the array that has a specific key
I have the following object array: specifications: Array(63) 0: {key: "1", value: null} 1: {key: "11\uFF0E11", value: null} 2: {key: "155\uFF0E50", value: null} 3: {key: "2", value: null} 4: {key:…
-
0
votes3
answers6310
viewsA: Problem with brmask in Ionic 4?
When using [(ngModel)] you need to define the attribute name. In your case it would look like this: <ion-input name="cpfUsuario" [(ngModel)] = "usuario.cpf"…
-
0
votes1
answer76
viewsQ: How to put mat-chips inside a textarea
I’m using the Material Chips Angular together with a textarea. I would like to place my Chips list inside my textarea. Currently works as follows: I wish I had something like: My current code name:…
-
0
votes0
answers131
viewsQ: Condition *ngIf for applying a class
I am trying to apply a class when my element is clicked, but it is within two *ngFor. I thought to do with multidimensional array but apparently this is not the correct form because it is applying…
-
0
votes1
answer449
viewsA: Self complete material how to stay the mat-options after selecting an option?
After searching for a while I found a way to open the panel through method. To this was added a viewchild type Matautocompletetrigger: @ViewChild('inputContasB2W', { read: MatAutocompleteTrigger })…
-
2
votes1
answer449
viewsQ: Self complete material how to stay the mat-options after selecting an option?
I’m using the Material Auto Complete Angular After selecting an option from the list the mat-options disappear, I would like them to remain until you click out of the input. Follow gif showing the…
-
0
votes1
answer2223
viewsA: Cannot read Property push of Undefined Angular
I resolved it that way: I made a logic to only push if there are elements, if there are no elements still receives the object: this.produtosConfirmadosAnuncio[index].idContasAnunciarB2W = [{id:…
-
0
votes1
answer2223
viewsQ: Cannot read Property push of Undefined Angular
I have the following model: produtosConfirmadosAnuncio.model.ts: export class ProdutosConfirmadosAnuncio{ idContasAnunciarB2W:[{id: number}]; } I start it this way: produtosConfirmadosAnuncio:…
-
5
votes2
answers504
viewsQ: Pop up an icon in the middle of my image by hovering the mouse
I am trying to bring up a zoom icon on top of an image while passing the mouse over it (The screen has several images, the icon should appear only in the image that the user passed the mouse) I…
-
2
votes1
answer55
viewsQ: Animation that reveals element from left to right
I have a <mat-divider></mat-divider> and I need to get it revealed from left to right, as if it were a progress bar being filled Does anyone have an example to introduce me? I could only…
-
1
votes1
answer1326
viewsQ: Concatenate a string with number in Typescript
I’m trying to add a 0 in the formatting of my date/month, but I’m not able to concatenate 0 with a string. I tried something like: var dd = dataAtual.getDate(); if (dd < 10) { dd = '0' + dd } I…
-
2
votes1
answer92
viewsQ: Go inside to compare if there are equal values
I need to do one to check if inside my array this.variacaoForm.value.variacoes has a sku like the other, I tried something like: for(let i=0;i<this.variacaoForm.value.variacoes.length;i++){…
-
0
votes1
answer37
viewsQ: ngx-filter-pipe is returning the wrong index of my *ngFor when element is filtered
I have a pipe that performs a filter on my *ngFor: <input [(ngModel)]="anunciosFiltro.name" type="text" name="filtra" id="filtra"> <tr *ngFor="let anuncio of sortedData | filterBy:…
-
0
votes1
answer177
viewsA: Is there any way to use html tags in an interpolation?
I managed to solve it that way: <p [innerHTML]="data.descricaoDialog"></p>
-
1
votes1
answer177
viewsQ: Is there any way to use html tags in an interpolation?
I have a component that calls a confirmation dialog, I pass to the dialog the title and the description of the dialog in this way: const dialogRef = this.dialog.open(ModalConfirmacaoGeral, { data:…
-
0
votes1
answer130
viewsQ: Repeat structure to replace the value of one array to another
I have the array this.produtoAlvoAlterar.variacao.preco_variacao I need to replace the variable tag of this array with the value contained in the array…
-
1
votes2
answers416
viewsQ: How to make multiple http requests at angular?
I need to make an http request for each element of my product array. I tried to do with for() but sometimes it doesn’t work, my browser stops working and it costs to close (I thought it could be…
-
0
votes1
answer90
viewsQ: Retain a request after 5 seconds in case of error
I need to retain my http request after 5 seconds in case of error. I tried to implement with retryWhen but I get: Property 'retryWhen' does not exist on type 'Observable'. [2339] I tried so:…
-
1
votes1
answer50
viewsA: ngModel is showing the wrong input values
I discovered, when a *ngFor is iterated on inputs, the Names should be different, I put it in the name="xxx{{Indice}}" and it worked
-
1
votes1
answer50
viewsQ: ngModel is showing the wrong input values
I have an ngFor that runs through an array Products. Inside this array has the field: value_venda_current, I am trying to make a *ngFor to go through this array and show an input for each product,…
-
0
votes2
answers41
viewsA: my textarea does not want to show content with you in my ngmodel
For me it worked that way: <textarea class="form-control" rows="3" #textbox (change)="produto.descricao_b2w.descricao = textbox.value">{{ produto.descricao_b2w.descricao }}</textarea>…
-
0
votes2
answers41
viewsQ: my textarea does not want to show content with you in my ngmodel
I have an object that I receive from a request, I am trying to put the value of this attribute in the template but it does not appear in the textarea. for(let…
-
0
votes1
answer76
viewsQ: Use Elvis Perator in conjunction with ngIf
Hello, I have the following element: Product.description_b2w.description Sometimes that description does not exist in this product, so when I try to apply ngModel and *ngIf in it I get: Cannot read…
-
0
votes1
answer52
viewsQ: Repeating structure that adds elements in an array without repeating elements
I have an array with the name Products. I need to create a function that whenever called adds the elements of Products for the product array Products. I tried something like:…
-
0
votes3
answers342
viewsQ: Function that adds/removes element of the array by clicking checkbox at the angle
I have a checkbox that when clicked I should add/remove this element depending on the action. I tried something like: adicionaProdutoSelecionado(produto,event){ if (event.target.checked === true) {…
-
0
votes1
answer56
viewsA: Sort mat-angular-table is prioritizing uppercase letters
I was able to settle it by capitalizing before comparing: return this.compare(a.nome.toUpperCase(), b.nome.toUpperCase(), isAsc);
-
0
votes1
answer56
viewsQ: Sort mat-angular-table is prioritizing uppercase letters
I’m using the mat Sort to sort a mat-table at the angle, the problem is that when I sort upwards the algorithm is taking uppercase letters as a priority, so if I have a table with the following…
-
0
votes1
answer363
viewsQ: Cannot read Property 'hasError' of Undefined when trying to put Validator required
I’m trying to put a required Validator in a field, but I’m getting: ERROR Typeerror: Cannot read Property 'hasError' of Undefined I tried something like: <form [formGroup]="variacaoForm"> My…
-
2
votes1
answer226
viewsQ: ngModel validation does not work in select field
I am trying to put a required validation in select and then show if the user fails to fill in. I tried something like: <select required #selecttipoproduto="ngModel"…
-
2
votes1
answer395
viewsQ: Pass data from one component to another in angular
I have a component that shows an image and another component that should change the src of that image. This is what I tried to do: Profile.component.ts alteraDadosPerfil(){…
-
0
votes1
answer291
viewsA: Angular material table is not doing sorting
I managed to fix it, after you do the this.dataSource = new MatTableDataSource(this.dataSource) must do: this.dataSource.sort = this.sort;…
-
0
votes1
answer291
viewsQ: Angular material table is not doing sorting
I am trying to put sorting in my material angular but by clicking on the corresponding ordering arrow nothing happens. I tried something like: <mat-table #table id="tabelaLogs"…
-
0
votes1
answer221
viewsQ: How to work with Session at the / jquery angle
I’m developing a website where I need to store in the section some data as surveys performed. We chose to develop the system’s from in angular/jquery. In php I saw that there are Sesssions. These…
-
0
votes1
answer636
viewsQ: Change width of angular mat tooltip
I need to increase the width of the angular mat tooltip Angular Material Tooltip I tried to: ::ng-deep .mat-tooltip { padding: 15px; font-size: 12px; } The padding and font-size has been applied,…
-
0
votes1
answer459
viewsQ: mat-table Sorting does not work in Angular
I’m trying to Sorting my columns with the material table Sorting, but I click on Sort and nothing happens. My template: <table id="tabelaLogs" mat-table [dataSource]="dataSource" matSort…
-
0
votes1
answer130
viewsQ: Undefined variable in the Variable when trying to send email
I need to send email to more than one person, for that I created a repeat structure for, but I’m getting that my variable is undefined. I tried something like: public function avisarAnjos(Request…
-
0
votes1
answer1777
viewsQ: "Expected Response code 220 but got an Empty Response" when sending email
I am trying to send an email using the Standard. I tried something like: api.php: Route::get('emailAnimalEncontrado', function () { $data = array( 'name' => 'Novo animal encontrado em Franca.…
-
1
votes2
answers262
viewsQ: Return array of properties in the Laravel
I created a function in the controller that returns the users where the user condition is 1. Currently it is returning in json all the data of this user. How can I return only user emails? I tried…
-
2
votes1
answer215
viewsQ: Perform validation in the form only after losing focus on the Validator angle
I’m using the validations of the reactive forms at the angle, I put a valid email validation, the problem is that while the user is still typing the email already appears the . I would like to know…
-
1
votes1
answer143
viewsQ: Reactive validation at angular with formgroup
I’m trying to put an error message in the template, but I’m not getting to the Validator I created. This is the Validator: criarFormularioDeUsuario() { this.formularioLogin = this.fb.group({ email:…