Posts by André Roggeri Campos • 647 points
13 posts
-
0
votes2
answers156
viewsA: Docker and angular circling communication with api
What you want to do is not possible. When you access your application, it is running in your Browser (Outside of the Docker network). That’s why it doesn’t work.. In order for this to be feasible,…
-
0
votes3
answers262
viewsA: Browse array to find a particular index
Use the Array.find to fetch one element in the array, if the element is not found, the return is undefined search = users.find(user => user.nome==ipt.nome && user.senha==ipt.senha)…
-
5
votes2
answers3047
viewsA: How to insert HTML within an Angular 4 Component?
You’re looking for the tag ng-content it allows you to access what was passed in the body of the. Example: import {Component} from '@angular/core'; @Component({ selector: 'custom-component',…
angularanswered André Roggeri Campos 647 -
2
votes1
answer226
viewsA: How to apply javascript events to Angular?
I don’t see much point in using jQuery to do this being that the Angular itself supports it natively. Using the native events, you can build a form and subscribe to its value in the following way:…
-
1
votes1
answer360
viewsA: How do I refresh the Angular Primeng Automatic Dropdown?
By the structure of your code, just call the method carregarEstilos within the method salvarEstilos salvarEstilos(form: FormControl) { this.estiloService.adicionar(this.estilo) .then(() => {…
angularanswered André Roggeri Campos 647 -
2
votes1
answer4161
viewsA: How to apply console.log at the angle?
Your return is incorrect. See that you should be returning a Promise of the kind Cerveja, but you’re returning the type void adicionar(cerveja: Cerveja): Promise<Cerveja> { const headers = new…
-
1
votes1
answer2882
viewsA: How to get value from Response
JSON parse was missing. onSubmit(loginUsuario, senhaUsuario) { this.usuarioService.login(loginUsuario, senhaUsuario) .map(data => data.json()) # <---- Transformar texto JSON em objeto!…
angularanswered André Roggeri Campos 647 -
14
votes2
answers16831
viewsA: Nullinjector error: No Provider for
You need to add your CervejaService on the list of providers of your module. Example: import { CervejaService } from './cerveja.service'; @NgModule({ imports: [ // ... ], declarations: [ // ... ],…
-
1
votes1
answer779
viewsA: Angular 5 problems with routes
You need to pass the absolute path to the route. Example redirecting by code: this.router.navigate(['/curso/1']) Example redirecting by links: <a [routerLink]="/curso/1">Link</a>…
-
1
votes1
answer222
viewsA: I cannot load my Grid at Angular
One of your Times seems to be wrong. I have noticed that many times the Visual Code Intelisense imports the Angular modules incorrectly. Replace the @angular/http/src/http_module for @angular/http…
angularjsanswered André Roggeri Campos 647 -
1
votes1
answer90
viewsA: Django Models with default value in another branch
Django actually sets the default value by code. I believe the reason for this is because it is possible to pass a function to the value default, something that would not be feasible to do in a…
-
1
votes1
answer256
viewsA: Create HTML Tag with Angular 5?
At Angular 2+, the same behaviour can be obtained through components. You create a component, and you import it into other components. I recommend reading the Angular documentation,specifically the…
angularjsanswered André Roggeri Campos 647 -
7
votes1
answer391
viewsA: Generate 9-digit keys with Python
You can use the method combinations module itertools import itertools import string for row in itertools.combinations(string.digits + string.ascii_uppercase, 9): s = ''.join(row)…