Questions tagged as 'typescript'

1
answer

Modifier of access "private" in TypeScript

In most of the examples I encounter in TypeScript, I see that the attributes of the class do not use the private access modifier. Is it a matter of design or is there any difference in how Java works? export class Aluno { codigo:n...
asked by 23.11.2018 / 10:42
1
answer

Redeem user's phone number

On Android, using Java, you can retrieve the device user's phone number with the following code: TelephonyManager tMgr = (TelephonyManager)mAppContext. getSystemService(Context.TELEPHONY_SERVICE); String numero = tMgr.getLine1Number();...
asked by 19.10.2017 / 16:17
2
answers

Error in 'this' in a typescript function

I'm having an error in the function below: export const throttle = (func: Function, limit: number) => { let inThrottle: boolean; return function () { const args = arguments; const context = this; if (!inThrottle) {...
asked by 25.05.2018 / 14:55
1
answer

Angular Mask Doubts

Hello, I'm new to Angular and I'm having mascara problems! I'm using the masks of: "Angular-input-mask"; I have a form that has a 'CPF' field, the mask is applied perfectly. Visually when I type a letter, this letter does not appear in the fi...
asked by 11.04.2018 / 15:12
3
answers

Synchronous query in SQLite using Ionic

I have the following function below: public requisicaoXPTA() { this.database.executeSql("SELECT * FROM tbl_xpta", []).then((data) => { // o resultado retorna aqu na variável data }, (error) => { console.log(e...
asked by 01.12.2017 / 16:24
1
answer

POST with angle 5

So, I'm trying to make an app with angular 5 using auth with token. For that, in login, I need to make a post in my API (which I tested by postman and it's working), but I'm having a hard time doing this with the angular. My code is as follows:...
asked by 31.01.2018 / 16:59
1
answer

Group data with NgFor and GroupBy

Before in Angular 1 when I wanted to do a grouping of data it was like this: ng-repeat="(key, value) in me | groupBy: 'role_id'" In my object me had a list of users with a different role_id field. Hence I wanted to do this: # Admi...
asked by 14.06.2017 / 21:29
2
answers

How to convert a file in javascript format to ts format?

I know that the TypeScript language is used to compile files in JavaScript. But I wonder if there is any tool that makes it possible to do the reverse. Is there any way to convert a JavaScript file to a TypeScript structure, something automat...
asked by 14.10.2016 / 16:05
2
answers

Close modal when clicking the button

Hello, I have this following modal, whenever I click on the "Rejected sale" button it opens, but I wanted to close this same modal every time it clicked on the "Send" button, which in the case and my submit, as I do this? <div class="chat-f...
asked by 20.12.2018 / 16:27
1
answer

My filter pipe is returning the wrong columns from my table

I tried to deploy a filter pipe but I noticed two wrong behaviors. Possessing two elements in my table: sfafasf: 150.00 and other variable cost: 80.00 When you put the name "other variable cost" in the filter field, the first row of the...
asked by 03.10.2018 / 22:23