Posts by Herbert Junior • 410 points
45 posts
-
0
votes3
answers342
viewsA: Function that adds/removes element of the array by clicking checkbox at the angle
adicionaProdutoSelecionado(produto,event){ if (event.target.checked === true) { this.produtosSelecionados.push(produto); } if (event.target.checked === false) { var index =…
-
1
votes3
answers1021
viewsA: Customized Angular 2/4 validator
ValidadorCPF(c:AbstractControl) : {[key:string]:boolean} | null{ if (c.value !== '000.000.000-00') { return { cpf : true}; } else{ return null; } } Declare in your typescript this validation and try…
angularanswered Herbert Junior 410 -
1
votes2
answers1947
viewsA: How do I manipulate 3 Checkbox in Angular 2?
Declare a variable in your Typescript checks = [ { id: 1, name: 'check 1', check:"true" }, { id: 2, name: 'check 2', check:"false" }, { id: 3, name: 'check 3', check:"false" }, { id: 4, name: 'check…
-
0
votes1
answer531
viewsA: Map Json Angular Data 2
Since you are already assigning the subscribe value to a variable in your typescript, just call it in your view {{planos.id}}
-
2
votes2
answers472
viewsA: How to read a JSON file dynamically? (ANGULAR 2)
If you want something different you could use the . foreach array method Would something like this this.mensagem = mensagem this.mensagem.forEach(men => { this.adicionarMensagem(men); }); This…
-
0
votes3
answers908
viewsA: I have the following error in my Ionic project "Error: Uncaught (in Promise): Typeerror: Cannot read Property '0' of Undefined"
The object is not being assembled ... probably here "responseData = result;" Change to "responseData = result.json();" I believe that’s what’s wrong.…
-
1
votes1
answer782
viewsA: ERROR Typeerror: Cannot read Property
You are calling in the statement an object and at the time of calling is passing the ID ... <button (click)="metodoTeste(clientes)">Cancelar Cielo</button> Make that attempt, I believe…
-
0
votes1
answer257
viewsA: Angular with JSON + Typescript
As it is a property of your Typescript, it will be seen in your HTML... <table> <thead> <tr> <td> Mensagem </td> </tr> </thead> <tbody> <tr *ngFor…
-
0
votes4
answers1532
viewsA: Angular 2 Binding in Component
The right one would be to use a variable of type Observable... and use the method subscribe... this ensures that it will be executed after the return... metodo.subscribe(result => { this.lista =…
-
1
votes2
answers832
viewsA: Disable Initial validation of the Angular form
When you use the <div *ngIf="!loginForm.controls.login.valid" class="invalid-feedback">Login invalido</div> You are asking to display if the form is invalid ... so it is appearing right…
-
1
votes1
answer112
viewsA: Redirect page after login
{ path: 'pagina', component: SistemaComponent, // Layout diferente da página de login children: [ {path: '', component: PaginaComponent} ] }, {path: '', component: LoginComponent}, {path: ':to',…
angularanswered Herbert Junior 410 -
0
votes4
answers3388
viewsA: Cannot read Property 'name' of Undefined
Good afternoon, try this code snippet. <mat-error *ngIf="contactFrm.get('name').errors"> {{ contactFrm.get('name').errors.required }} </mat-error>…
-
0
votes1
answer119
viewsA: Return to incorrect IF condition
let array:any[] = []; let exist:boolean = false; this.DadosQueTaNaTela.forEach(apielement => { var api = apielement; existe = false; this.OlhaDadosDaApiJson.forEach(dadoselement => { var dados…
-
0
votes2
answers581
viewsA: Multiple GET requests with Angular 4/5
I see no problem using 2 GET methods, for example: And I think I should create two interfaces one for each return ... so I could get the easy result: interface Retono1{ retorno: number; retorno1:…
angularanswered Herbert Junior 410 -
0
votes2
answers911
viewsA: URL exchange but view keeps - routing with angular 4
Good morning buddy, try to run like this ngOnInit() { let teste = +this.route.snapshot.paramMap.get('id'); console.log(teste ); }
angularanswered Herbert Junior 410 -
0
votes2
answers745
viewsA: Angular Eventemitter 4 does not work
Good morning @Output() emitter: EventEmitter<any> = new EventEmitter<any>(); eventEmitter needs to be an Output since it will send a reply and needs to be imported as import {…
-
0
votes2
answers494
viewsA: Initialize a form with values of an object with ANGULAR 4
Good morning, to be able to edit the values by Typescript you need to change the (ng-model)="cliente.nome" for [(ng-model)]="cliente.nome", because the property between the [] is just a GET to be…
-
0
votes2
answers376
viewsA: Filter with Typescript
Good morning, To solve your problem I believe it could be done as follows: this.cartoesFiltro = this.cartoes; // apenas para manter o original sem this.cartoesFiltro…
-
0
votes2
answers138
viewsA: Automatic cast with Typescript?
You can create an extra property on your interface like this is_correct:number; is_correct_bool: boolean; Then you can use the this.QuestionInterface.answers.forEach(element => {…
-
0
votes2
answers137
viewsA: Angular 4 - Input / Output Access parent event via Typescript
Good morning Luiz Felipe, in Angular can be created a service, so created a service he is an Injectable() and so it can be passed in the constructs of the new classes in typescript. Using the CLI…
-
0
votes3
answers885
viewsA: SQL server connection with angular 4 +
Leonardo, first the angular has no way to make a connection to the database, it is necessary an application using a backend (c#, java... ) with this application you will create a service (webapi) to…
-
1
votes1
answer108
viewsA: How to assign number to the name Enum Typescript?
export class Viagem { tipoViagem: string; descViagem: string; public get $descViagem(): string { if (this.tipoViagem == "00") { return "REGULAR"; } …
-
-2
votes1
answer585
viewsA: Angular 4.html Component problem
Apparently in your code you have an > the most at the end of </html>> remove and try again, this test.component.html doesn’t need to <html> <head> ... because this already…
angularjsanswered Herbert Junior 410 -
0
votes2
answers96
viewsA: How to listen to a request at Angular 4
Good morning, you can use an interval atualizarDados(){ this.userService.lista() .subscribe(data => { this.usuarios = data }); } window.setInterval(atualizarDados, 600); This will make every 600…
-
0
votes3
answers1219
viewsA: How to delete with Angular 4
You could declare a variable http:Http And then use a post or http deleteClient(idcliente){ this.http.get("url:porta&idcliente="idcliente) .subscribe(result => { console.log(result.json())…
-
0
votes2
answers368
viewsA: How do I log out at Angular 4?
Good morning, this will depend on how you are logging in ... if it is with cookie or localstorage, a component can be created, where you could just use the method to clean up by Typescript and…
-
0
votes2
answers548
viewsA: How to detect change in input value with active readonly
Add in your Javascript the following $("#estado-cliente').on('change', function () { alert("Estão tentando alterar"); });
-
1
votes1
answer43
viewsA: Bring only certain amounts of MVC bank information
In your Entity Framework query you need to specify how many records will be listed ... Try to create an object DaoCurso And use a list of that course List<DaoCurso> curso = null; curso =…
-
0
votes0
answers76
viewsQ: Send a Enter command using Sendmessage Or Postmessage DLL
I am trying to send a enter command using c #, I can write in another process using this dll, but when I am trying to send the enter command is written the following "{ENTER}" ...…
c#asked Herbert Junior 410 -
0
votes2
answers434
viewsA: Pass the value of a Function post to another Function?
$.post("url", {dado: "campo"}).done(function(val) { var situa; if(val == 1){ situa = 'você não foi selecionado'; }else{ situa = 'você foi selecionado';} }); alert(situa); )}; It is not advisable to…
-
1
votes1
answer112
viewsA: Dynamic Select with query
You can use a . getJSON() in your javascript and resume a list of country options ... $.getJSON("SelecionarPaises.php", data : idcontinente).done(function (paises) { // vai receber uma lista de…
-
1
votes2
answers471
viewsA: How to leave the json of two or more object classes on the same level in Asp.Net MVC
public class DaoContato { public int ContatoID {get;set;} public string Nome {get;set;} public int Ramal {get;set;} public int UnidadeID {get;set;} public int NomeUnidade {get;set;} } List<…
-
0
votes3
answers626
viewsA: How to use Lambda expression in List<List<Object>?
Could do so List<ItNota> lista = conn.TABELA.Select(x=> new ItNota() {CdClien = x.CdClien}).ToList(); So you would return a list of type Itnote(), using the Entity Framework. And to perform…
c#answered Herbert Junior 410 -
0
votes3
answers554
viewsA: Using the Case When Then command with Entity Framework
I recommend that you create an object of the Daoretorno type with equal fields of the Database only with a string attribute to be able to assign the value after listing, in the case a statusstr…
-
0
votes2
answers35
viewsA: Direct access Action Form
Instead of using <button name="btn_rg" value="enviar"><span>Concluir</span></button> try to use <input type="submit" value ="Enviar"> Served?…
-
0
votes2
answers736
viewsA: Error: connection to database already opened
Probably the (Connectionbank.State == Connectionstate.Closed) does not serve to perform this operation, if I am not mistaken I think there is a method related to these connection classes that checks…
-
1
votes1
answer153
viewsA: insert data with ajax and switch in php
$.ajax({ url:'cor.php', data : {acao:'inserir'}, dataType : 'GET' }) .done(function (retorno) { // }); In this case the action is how the variable is written in the Php code.…
-
0
votes3
answers119
viewsA: create java script functions after rendering all partial views
Try to put the reference of your plugin in your Masterpage... This may be happening because the reference is being made in your Partial.
-
2
votes2
answers87
viewsA: Security of My Intranet Project
First your IIS directory needs to be configured to be accessed only with your user profile ... And from the moment you give a "Publish" in the application, the code is compiled and different files…
-
1
votes3
answers227
viewsA: Hyphenate when value is 0 in select
Select IIF(Campo = 0, '-', campo) AS CAMPOSELECIONADO from TABELA That would work for your case.
-
-1
votes1
answer477
viewsA: Error when entering monetary value into bank
Good night, Try using "." instead of "," at the decimal value. objArquivoGeradoTrailler.ArquivoTrailler_TotalValor = 137421.20; or you can use the objArquivoGeradoTrailler.ArquivoTrailler_TotalValor…
-
1
votes2
answers94
viewsA: PHP data sync with Javascript
From what I understand of your code each time you click on the LINK runs a postback and reload the page ... Try using javascript to do this. Create an ID for your Link and use it in Javascript like…
-
0
votes3
answers1136
viewsA: load content after an element
Could be done using $.getJSON done(); Thus: funtion getTemplate(parametro){ $.getJSON("url", data : {paramentronome : paramento }). .done(function (dado ) { $("#div").html(dado); }); } That helps?…
-
0
votes4
answers1791
viewsA: Display login username on screen
You could create an HTTP request method for the code to return a JSON containing all the data you want to use, and pass to Javascript using Jquery. $.getJSON("DadosDoUsuario.php"). done(function…
phpanswered Herbert Junior 410 -
2
votes1
answer44
viewsA: Problems with $.get and PHP
You have tried using $.get(). done(). Always(). fail()? From what I’ve seen, these methods would have to be called after the previous termination .... function cont() { setTimeout(function () {…