Posts by Pedro Henrique Cndido Ferreira • 377 points
26 posts
-
1
votes1
answer304
viewsA: Angular 8 - Picking up attributes on the return of the API service. httpClient
Okay, you want to take the feedback from this Observable get, you can use a callback and listen to this method using a subscribe, it would be good if you took a look at the documentation and…
-
0
votes1
answer231
viewsA: How to make Lazy loading correct at Angular 6, not known component error
I haven’t seen where you import the modules, that’s not how you do Lazy loading. By default ngModules are loaded avidly, which means that once the application is loaded all ngModules too, they are…
-
-2
votes2
answers716
viewsA: How to check if a string contains a word
you can use the.find string from a look at the examples in the documentation prop = "teste.com.br" if string.find(prop, "teste") then print ("teste está presente na PROP") else print ("test NÃO foi…
-
0
votes1
answer327
viewsA: Problems with angular routes
const routes: Routes = [{ path: '', component: LoginComponent, children: [ { path: '', redirectTo: '/rotaQualquer', pathMatch: 'full' }, { path: 'login', loadChildren: () =>…
-
-1
votes2
answers44
viewsQ: Is Lodash still needed with ES6+?
I see that in 2020 lodash is no longer needed, we managed to do 90% of what it does with ES6+ and fast, so I get the cruel doubt, is it really necessary to install a giant dependency like this in…
javascriptasked Pedro Henrique Cndido Ferreira 377 -
-1
votes1
answer57
viewsA: After a create, update an array with data from a get or increment the Response in the array?
Friend, this question can be quite explored, you can use state control to do this. There are some libraries available. ngxs ngrx You would trigger the actions that would update your lists. You can…
-
1
votes1
answer60
viewsA: Map Formgroup to an object
One of the means is to use destructuring and assemble your object const insured = { this.user.userId, typeSex: {id: 1, initials: 'M', description: 'Masculino', code: '1'} as TypeSex, ... } you could…
-
0
votes1
answer146
viewsA: How to take the mat-Selection-list "Aria-Selected" attribute with angular?
You can assign a template variable reference to it, #accordion, and pass it inside the method you need ex: change(#accordion) and there you look for the property you need inside. to learn more about…
-
0
votes1
answer26
viewsA: Render multiple components based on a number
The ideal is you pass the props inside Faregstar and pick them up inside the Component const style = { width: this.props.size, } return <div style={style}> Hello </div>…
-
0
votes1
answer1578
viewsA: How to resolve CORB even by adding Access-Control-Allow-Origin
Return the response with the header 'Access-Control-Allow-Origin: *' Check the code below for the PHP server response. <?php header('Access-Control-Allow-Origin: *'); header('Content-Type:…
-
2
votes1
answer967
viewsA: How to access information from a formGroup that is embedded in a Formarray
Right, inside your Component you can create a get get formControlCompanies(): FormArray { return <FormArray>this.roteiroTeste .get('cenarios'); } where you need to call you will use…
-
2
votes2
answers699
viewsA: Angular (8) form validation message
A simple fit would be, create a get for your form get formControl() { return this.form.controls; } in html: formControl.nome.length < 10 but the correct thing to do is to create a Validator,…
-
0
votes1
answer62
viewsA: Is it possible to pass parameters from one application to another via Query String? Angular 2+
Buddy, the ideal would be for you to have an intermediary between the two, the famous backend.. where it could be done in various ways, you could generate a simple token with this, install the…
-
0
votes1
answer76
viewsA: Error when integrating template to Angular 7
To use the jquery npm install jquery --save at the angular.json "scripts": [ "../node_modules/jquery/dist/jquery.min.js" ] To use Jquery, you must import in any Component you wanted to use import *…
-
1
votes1
answer719
viewsA: How to style a Mat-Gymnator?
<mat-paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]"> </mat-paginator> in its component you will add Encapsulation: Viewencapsulation.None, this will make…
-
0
votes1
answer82
viewsA: Assign the same value to internal and external Formcontrol using Controlvalueaccessor with Reactiveforms
What if you have @Input() formGroup: Formgroup; in your Input component and pass your formGroup into it? I think it solves your problem before : <ng-container [formGroup]="localForm">…
angularanswered Pedro Henrique Cndido Ferreira 377 -
0
votes1
answer84
viewsA: Angular - transfer components from one system to another
If it’s the effect drag and drop angular implemented in version 7, to transfer data between components you can use Input and output, or Subject in services for component communication, another…
angularanswered Pedro Henrique Cndido Ferreira 377 -
1
votes1
answer674
viewsA: How to process JSON that has an object array as property with Observable (Angularjs)?
export interface Objeto{ nome: string; /* demais propriedades */ } export interface ObjetoPayload { data: Objeto[]; } @Injectable({ providedIn: 'root' }) export class ContaCorrenteService{…
-
2
votes1
answer221
viewsA: How to update the values of my form through a modal?
Instead of assigning the values, how about trying to set them using the form? this.formVenda.get('nome').setValue(data.nome); this.formVenda.get('idContato').setValue(data.id);…
-
0
votes2
answers36
viewsA: Receive a status and mark as CHECKED - Typescript
The idea would be to put a property [checked]="userChecked" or something that comes from the backend saying that this user has been checked, then you put it to this, or you can use the reactive…
-
2
votes1
answer165
viewsA: What’s the secret for on the express?
Yes, you should have that. A session secret in connect is simply used to calculate the hash. Without the string, access to the session would be "denied". Take a look at the connecting documents,…
-
0
votes2
answers67
viewsA: Angular 2x - Do not perform databinding for 2 equal objects
A quick way to clone a matrix.. clone(fn) { const arr = [...Array(1000000)]; console.time('timer'); fn(arr); console.timeEnd('timer'); } Note: Of all the ways, the only way to deeply clone an array…
angularanswered Pedro Henrique Cndido Ferreira 377 -
0
votes1
answer76
viewsA: Checkbox shows error in console when changing Checked state
I did so, using the data you passed. angular-checkbox
-
0
votes4
answers2324
viewsA: Angular 7 - Popular object on return of API service. httpClient
You can try something like this by changing it to this: in service todasCoberturas() : Coberturas[] { return this.http.get<PayloadCobertura>(\`${this.UrlServiceV1}combinadoPlano?…
-
0
votes1
answer48
viewsA: Httpclient URL limit
How do you feel about using enviroment to center your url? export const environment = { production: true, apiBase: 'http://localhost/api_cco/' }; And I see that this is a queryString.. would be nice…
-
1
votes1
answer61
viewsA: Problem to migrate bootstrap v3 to v4 with Angular 8
I went to yours in yours package.json couldn’t find "bootstrap": "^4.3.1", so I added. <div class="row"> <app-painel-simples titulo="Consultas marcadas últimos 30 dias" class="col-6">…