Posts by Patrick Lima • 392 points
20 posts
-
0
votes1
answer266
viewsA: Validate input, using formbuilder, with Pattern at angular 9
I would try much of that validation on component and did not see reference in the template (your #channelTitle). First changing us Validators of FormBuilder Pattern and maxlength, and exposing the…
angularanswered Patrick Lima 392 -
0
votes1
answer50
viewsA: Change value from back to front end (in service)
Are you using the HttpClient? If yes, you can use the Operator map Rxjs to change type, so: this.objetoConvertido = this.httpClient.get<ObjetoIdValue>('suapibackend').pipe(map(resposta =>{…
-
0
votes1
answer185
viewsA: How to change the color of a Row with a ngx-datatable active Selected?
I believe that if you use as below, it works: :host ::ng-deep .ngx-datatable.material.single-selection .datatable-body-row.active .datatable-row-group { background: red !important; } But you need to…
-
1
votes1
answer323
viewsA: Validate Typescript file size
I see no problem with your validation, but the file[0].size returns the value in bytes, what would be the maximum size you would like? Let’s assume it is at most 2MB (megabytes): verificar(){…
-
1
votes1
answer977
viewsA: Reuse component in another component and get child data in Angular
You can use the @Output along with EventEmitter and "publish" your new data to whom you use the component. In your CepComponent create property: @Output() cepResult: EventEmitter<Cep> = new…
-
0
votes2
answers476
viewsA: Error with checked property and value in Angular
A simple way that I use to get the checked value of radios with even name in pure Javascript is like this: getRadioValor(name){ const radioValue = document.querySelector(`input[name =…
-
2
votes1
answer271
viewsA: How can I set an array within my formgroup?
I created a Stackblitz I tried to simulate your example. I created a list of the part that will add and/or remove your items listaatributos, was like this: add(index: number, newValue) {…
angularanswered Patrick Lima 392 -
1
votes1
answer1085
viewsA: Problem running ng build Angular
The error you have apparently relates to this angular-cli link https://github.com/angular/angular-cli/issues/12414#issuecomment-428161804 He says that if your project has a library dependency tether…
-
0
votes1
answer105
viewsA: Generating correct json with p-dropdown primeng?
Bruno, I believe your error is related to Java and is quite common in relationships Many-to-Many, a good article is this…
-
1
votes1
answer125
viewsA: Overwrite the default icone of mat-Stepper angular material
To stay in the circle just put inside your <mat-horizontal-stepper> thus: <ng-template matStepperIcon="number"> <mat-icon>home</mat-icon> </ng-template>…
-
1
votes2
answers390
viewsA: How to get data from an observable firebase?
In his method teste() you do teste() { const test = this.recompensas.subscribe(recs => recs.map(rec => rec.valor )); console.log('valor de teste : '+test); } In that case the const test is a…
-
1
votes1
answer25
viewsA: Page loads before firebase data returns.
The db.collection("jedi").get() returns to you a Promise which is an asynchronous datum and which will not actually appear immediately. Through the .then you get the value and while it is running…
-
0
votes1
answer85
viewsA: View in ngModel Firestore return
I believe you’ve already found the solution but in case someone needs it, yours this.pessoasCursor.valueChanges(); is returning a Observable, it is necessary to register via subscribe to access…
-
1
votes1
answer245
viewsA: No component declaration after applying Lazy loading
Is there any other component or module external to the Dashboard that is using the DialogConfirmacaoExclusao? If so, I believe you put it on exports will solve the problem. exports:[…
angularanswered Patrick Lima 392 -
0
votes1
answer37
viewsA: Angular: Problems with Touchevents
Testing Chrome Dev Tools for events mouse seem to work for touch (test pending on real device). <div (mouseenter)="touchStart()" (mouseleave)="touchEnd()"> <div…
-
3
votes2
answers471
viewsA: What advantages does angular typing offer?
You have this tipagem, in fact, thanks to Typescript. Angular 2 is designed to work with the Typescript, which is basically a superset Javascript that compiles your typed code for pure Javascript.…
angularanswered Patrick Lima 392 -
0
votes1
answer121
viewsA: Cannot find module@google/maps
I strongly encourage you to use some angled library made for use of the maps api, such as the angular-maps. There are many problems reported with the definitive type created so far, the poor…
-
0
votes1
answer56
viewsA: How to remove screen header on some routes
Would you like to remove the <app-navbar> or the header comes from this <router-outlet>?
-
2
votes2
answers191
viewsA: How to pass Property-bind to router-outlet at angular 2
If I’m not mistaken, it’s not possible to pass a bind to router-outlet, it acts as only a selector that the Angular dynamically fills with the desired component based on the current state of the…
angularanswered Patrick Lima 392 -
1
votes1
answer550
viewsQ: Save form-data in webapi C#
I have the following code in Angular 2 for a form-data post method: upload(event) { let files: FileList = event.target.files; let formData = new FormData(); for (let i = 0, f; f = files[i]; i++) {…