Posts by Allan • 166 points
11 posts
-
1
votes1
answer36
viewsA: How to make this function return a Boleano type
Within your function, you have the onload that runs asynchronously. That way, you should turn your function into a Promise: function isFileValid(file: File): Promise<any> { let promise = new…
typescriptanswered Allan 166 -
0
votes1
answer129
viewsA: Kendo ui Chart with multiple graphics - Assincrono
I believe the problem lies in the scope of the variable dataSourceestrategicobarra. Try to do it this way: function createDataSourceGraficoBarra(idbarra) { var dataSourceestrategicobarra = new…
-
1
votes1
answer13
viewsA: Help with ORDER BY clause by string
You can do it this way: select nome , grau as grau_ordem , case grau when 0 then 'QS' when 1 then 'CI' when 2 then 'CDC' when 3 then 'QM' end grau , case faixa when 0 then 'NÃO' when 1 then 'SIM'…
-
2
votes2
answers381
viewsA: Average input data algorithm
You should count how many people are between 18 and 35, and not add up the ages of those who satisfy the condition. So instead of: if (idade >= 18 && idade <= 35) { percentual =…
-
1
votes1
answer183
viewsA: Unit Test - How to verify an expected error?
Based on an Issue in Chai (https://github.com/chaijs/chai/issues/415) follows the solution: const modulo = require('../modulo'); const chai = require('chai'); const chaiAsPromised =…
-
0
votes1
answer89
viewsA: Can I put one controller inside another in html?
For the specific modal, you can use the angular-ui-bootstrap (https://angular-ui.github.io/bootstrap/#! #modal), where you can call modals with templates and controllers you want. For other…
-
1
votes1
answer50
viewsA: Dynamic upload input layout with gallery
As the following elements are dynamic, you need to realize the bind of Handler change in the Document. So instead of using $(".dragNdropUpload_box input"). change(Function(){ ... Utilize…
-
0
votes1
answer60
viewsA: ng-repeat with mysql database data
More information is needed to understand what is happening in your code: HTML code where you are using the directive; List returned by your Query; By error, there are duplicate items (in the…
-
0
votes1
answer22
views -
0
votes2
answers400
viewsA: Filter combobox search Angularjs
By the code informed, it is not possible to conclude much. But for what you put here: $scope.filtroOperadora = function() { return ($scope.operadoras == busca.nome); } It doesn’t make much sense,…
-
3
votes2
answers1119
viewsA: Generating Barcode (Bankary billet) with Angular
You can take a look at the package that exists for angular 1.5 and adapt it to angular 5: https://github.com/allansli/angular-barcode-febraban#readme Use the source:…