Posts by Lucas Brogni • 1,012 points
68 posts
- 
		-1 votes3 answers229 viewsA: Angular HTTP subscribe does not return SponseIn this case your requested variable appears to be another Obervable.... You could do it this way: ngOnInit() { this.getPedidos(1); } private getPedidos = (tipo) =>… 
- 
		1 votes1 answer35 viewsA: Problems with Promisse: Promisse[Object]If using async/await is an option, you can do so: const Bloco1 = require('../../../models/Bloco1') async function getBloco() { try { let consulta = await Bloco1.findOne({ order: [['createdAt',… 
- 
		0 votes1 answer190 viewsA: Insert for each record found - PL/SQLTry to do that. INSERT INTO VARA (vara_id, foro_tribunal_id,nome) SELECT id, nome FROM foro_tribunal The oracle will take the data from select and do the Insert. If necessary you can do a Where in… 
- 
		0 votes1 answer538 viewsA: React Native - Drawer Navigation Problems Headeras you defined the headerMode for none He won’t list it. What you could do is leave it open and set the header to null when you don’t have the header on the screen. Ex: const FloatStack =… 
- 
		-1 votes2 answers475 viewsA: Httpclient POST request with Angular 7 returning UndefinedYou can do it this way : async minhaFuncao() { this.retorno = await this.http.post(`url`, dados, config).toPromise() console.log(this.retorno) } 
- 
		0 votes2 answers189 viewsA: With making a typescript composite filter?Array:any = [ {titulo: "test1", dataInicio: "12/02/2019", status:"aguardando"}, {titulo: = "test2", dataInicio:"13/02/2019", status:"iniciada"}, {titulo: "test3", dataInicio: "14/02/2019",… 
- 
		1 votes2 answers232 viewsA: email validation and password being equal and with minimum characterif (password.length < 8 || password.length > 16) { $('#validator').prop('disabled' , true); } if (password != confirmPassword) { $("#divCheckPassword").html("As senhas não são").css('color',… 
- 
		3 votes1 answer3418 viewsA: Request API with JavascriptSubstitute var request = new XMLHttpRequest(); request.open('GET', 'https://ghibliapi.herokuapp.com/films', true); request.onload = function() { For fetch('url da api', { headers:{ //seus headers }… 
- 
		1 votes1 answer91 viewsA: Angular for creating layoutLet’s go in pieces. 1- I noticed that to run the angle, you usually use Node for backend apps for example. I saw that you can create layouts with the angular, so, how do I run a project by Chrome?… 
- 
		0 votes1 answer147 viewsQ: Dynamic mounted Angular 5 trackI have a dynamic menu mount at the angle. The setup is done as follows: <ul class="pcoded-item pcoded-left-item" item-border="none" item-border-style="solid" subitem-border="solid" *ngFor="let… 
- 
		0 votes1 answer315 viewsA: Help with Json to get API valueUtilize print_r($data->buy); 
- 
		0 votes1 answer66 viewsA: How to delete multiple items from the bd with checkbox marked in Ionic 3?So you are assigning an array to date let data = [produto.id]; I believe the right thing would be let data = produto.id 
- 
		0 votes1 answer92 viewsA: Angular - Subgroup according to group id<app-classification-subgroup-list [idGrupo]="idGroup" ></app-classification-subgroup-list> Try to do so... to pass the id to the subgroup and use the ngOnChanges to call the method.… angularanswered Lucas Brogni 1,012
- 
		0 votes1 answer40 viewsA: Redirect user without tokenUses the method navigate of router angular to redirect. constructor(private router: Router, private http: HttpClient) { } user; token; ngOnInit(){ this.user =… 
- 
		0 votes1 answer365 viewsA: use ion-select dynamicallyIt does a function that fetches the data and does the following in its component: Create an Ngmodel for your select and call a function by changing the data. <ion-select (ionChange)="suaFuncao()"… 
- 
		2 votes1 answer32 viewsA: Unreachable code Detected at angularAs you said yourself, it does not make the notifty because it is after a Return. To solve, where you call the method checkOrderyou can call notify inside the subscribe.… angularanswered Lucas Brogni 1,012
- 
		0 votes1 answer28 viewsA: Mostar Selected QuantitiesThe idea of the solution is basically the same as the one you did to disable the button. Creates a function that traverses selectedVariation by passing the item and makes a Count of how many times… ionicanswered Lucas Brogni 1,012
- 
		0 votes1 answer541 viewsA: Mysql trigger to be fired whenever a field is editedYou can make a Rigger as below: DELIMITER $$ CREATE TRIGGER produto_update AFTER UPDATE ON producto FOR EACH ROW BEGIN if (NEW.quantidade <> OLD.quantidade) THEN /* insert modulos (descricao)… 
- 
		0 votes1 answer382 viewsA: Hide ButtonsWould it be possible for you to have a variable with the flavors added.: saboresAdicionados = []; And put on the button a disabled calling a tasty method (item) <button ion-button… 
- 
		0 votes3 answers737 viewsA: Make an "Update" with sum of a number that is as characterYou can do it like this: UPDATE produto SET codigo = produto.codigo + 1; but remember that you will be adding + 1 to all your codes as you are not passing any condition to the UPDATE.… 
- 
		3 votes1 answer1105 viewsA: Run an angular project 6 from githubRun a npm Install before running the project. Github is not downloading the node_modules folder A tip for not increasing the project too much on github is to put the Node.js library folder in the… 
- 
		4 votes1 answer4397 viewsA: Form validation with angular 6You can release the create button only when the form is valid, for such you can do so: <button type="submit" [disabled]="!createForm.valid" class="btn btn-primary"><a… 
- 
		1 votes1 answer261 viewsA: How to get a JSON result in Ionic 3, but echo result in PHPApparently it is with the variable phone, which should not be being passed. Try to do something like : $telefone = isset($_GET['telefone']) ? $_GET['telefone'] : null;… 
- 
		0 votes1 answer51 viewsA: Versioning of the ProcedurePass a parameter with the version for the trial and based on the informed version you make the data return. 
- 
		1 votes2 answers2968 viewsA: Store Promise output in a variableYou are already doing this. The value is inside the then in the variable result. Use what you need inside Then. function consultaMarcas(){ return new Promise(function(resolve, reject) {… 
- 
		2 votes2 answers75 viewsA: Add or subtract value according to the "release type" (MSSQL)SELECT MOVTIPOPRODUTO.ID_ENTIDADE, ENTIDADE.NOMECLIENTE, PRODUTO.NOMEPRODUTO, TIPOPRODUTO.DESCRICAO, MOVTIPOPRODUTO.ID_PRODUTO, MOVTIPOPRODUTO.ID_TIPOPRODUTO,… 
- 
		1 votes1 answer141 viewsA: Error when listing MYSQL data via Restful API with PHP (Ionic 3)You can make a JOIN and return the consumption already in the rooms query. $sth = $this->PDO->prepare("SELECT * from Comodos como INNER JOIN consumo_atual cons ON cons.comodo_id = como.id… 
- 
		0 votes1 answer505 viewsQ: SQL Server - Trigger does not run after a given fieldI’ve got Trigger down: CREATE TRIGGER AtualizaDataAlteracaoSegmentos ON dbo.Segmentos AFTER INSERT,UPDATE AS BEGIN Begin tran update Segmentos set DataAlteracao = GETDATE() where Id = (select ID… 
- 
		1 votes2 answers71 viewsA: How to write to mongodb via APIIn your case the itemName you are only receiving a string, so it will not be the whole form. Create a formGroup as follows: <form [formGroup]="form" (ngSubmit)="add(form.value)" role="form"… 
- 
		1 votes1 answer703 viewsA: Daughter Routes, Angular 5William this happens by just passing test2 he understands that you intend to access a level above the current. That’s why from Basenumerica you access the teste2 without problems passing only it. To… 
- 
		1 votes1 answer241 viewsA: Daughter routes at angular4William, your route is to /cadastro/bancos and not to /cadastro/dados-pessoais/bancos as it is being sent. Changes your button to redirect to ['/cadastro/bancos'] or creates a new Child in your… 
- 
		2 votes1 answer105 viewsA: Mysql Left Outer Join show only first resultIn fact it does not only show the first result. It is showing what you are asking for ( the sum of the total_sale column). Being a sum the value is grouped, so it will not show more than one result… 
- 
		0 votes3 answers885 viewsA: SQL server connection with angular 4 +Leonardo, what you want is not possible. Not directly by Angular in the case. The Angular is a framework for software development Front-end. The connection to the database is the responsibility of… 
- 
		2 votes2 answers243 viewsA: How to add variable to [JS] arrayIf your wish is to add to the array do locations.push({ lat: newLat , lng: newLng}); Javascript will add a new input to your array and then to retrieve it just go through it.… 
- 
		1 votes3 answers3288 viewsA: error message Cannot find a differ supporting Object '[Object Object]' of type 'Object'. Ngfor onlyYou are passing "Restaurant" and not "Restaurants" which is your array. <mt-restaurant [restaurant]="restaurant"></mt-restaurant> Replace with <mt-restaurant… angularanswered Lucas Brogni 1,012
- 
		1 votes3 answers63 viewsA: Business rule in a personal systemUnderstand business rules as what defines what your program will do. Whether or not you have a business. It’s the way the system will behave. In the case of your personal system to control the… business-ruleanswered Lucas Brogni 1,012
- 
		0 votes1 answer59 viewsA: Making a button read the functionsIn Html you can do <button type='button' onclick="verificaAposentadoria()"> Verificar </button> 
- 
		1 votes1 answer74 viewsA: Upgrading from IONIC 1 to 3: How to log in to JSON?Ramos, your API expects to receive a POST request and you are sending a GET. this.http.get(link) To send the data in the correct way use var data = JSON.stringify(this.usuario); this.http.post(link… 
- 
		1 votes1 answer411 viewsA: POST method in Angularyou can receive error handling by adding a sequence of the answer. ngOnInit(): void { this.apiDeSegurancaService.ObterToken().subscribe( res => { this.token = res }, error => { this.error =… 
- 
		1 votes2 answers1115 viewsA: How to work with Angular ngIF with screen resolution?You could remove the component using media queries. If it suits you, you can do it this way: @media screen and (max-width: 992px) { .conheca_projeto{ display: none ; } }… angularanswered Lucas Brogni 1,012
- 
		1 votes2 answers4395 viewsA: Post com x-www-form-urlencoded no Angulartries to pass the body only as an object: body = { grant_type : 'password' , username: 'varejo_user' , password: 'w6h5xgtl' } ; Staying like this: ObtendoToken(): Observable<string> { const… 
- 
		0 votes1 answer129 viewsA: How to make a recursive sum on a JSON object in Angular 6?Oops... you can do it that way: employees = [ { id: 1, firstName: 'a', lastName: 'A', position: 'PA', chefes: [2, 3], compensation: '123.00' }, { id: 2, firstName: 'b', lastName: 'B', position:… 
- 
		0 votes2 answers1139 viewsA: Get Solution Folder C#I fixed the problem by adding a data folder to Solution. string baseDir = env.ContentRootPath; AppDomain.CurrentDomain.SetData("DataDirectory", System.IO.Path.Combine(baseDir, "App_Data")); And… 
- 
		2 votes2 answers1139 viewsQ: Get Solution Folder C#I have a solution with 4 projects inside. In my controller I need to open an HTML that is inside another project, but I can’t open the file folder. Below follows print with my structure: The class… 
- 
		0 votes2 answers1162 viewsA: Ionic - wait for http get returnTo access the result of a Promise you can make the request in the service as follows: public get_usuario(usuario):Promise<any> { var resultado; return new Promise(resolve => {… 
- 
		1 votes1 answer67 viewsA: passing webapi value to select html in angular 2I believe the best way to do that would be to create a reactive form. You could do it this way. In HTML you could create the form with a formGroup this way. <form [formGroup]="form">`… 
- 
		1 votes1 answer496 viewsA: Request arrives null on C#I was able to solve the problem by making the request with an object of my own by mounting it in the request only with the fields that were of my interest, capture in the back-end, in case without… 
- 
		3 votes1 answer496 viewsQ: Request arrives null on C#I have a request that’s being made this way at angle 5. enviarEmail(titulo: TitulosCobranca, unidade: UnidadeEmpresa) { let param: any = { titulo: titulo, unidade: unidade } return… 
- 
		2 votes2 answers83 viewsA: Httpclient at Angular 4You can make the request like this: http.get(insere a url da api aqui) .map(res => res.json()) .subscribe(data => console.log(data)); angularanswered Lucas Brogni 1,012
- 
		0 votes1 answer204 viewsA: Property . length of json object returning number out of realityPasses the client email variable to JSON again with JSON.parse (variable). JSON.parse(emailsCliente);