Questions tagged as 'angular'

1
answer

How to use TrackBy in ngFor in Angular?

Hello, I have a repeat structure where a pipe filter can be applied. I have read that trackBy can aid performance because it does not render the DOM unnecessarily. I put it in my component: trackByFn(index, item) { return item.id; /...
asked by 04.10.2018 / 21:26
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
1
answer

Delete item from an Inioc array 2

I'm having a hard time understanding how the splice () method works. I need to delete items from an array, when I click on (x), eg: <ion-item *ngFor="let item of data"> <ion-grid> <ion-row> <ion-col width-50>...
asked by 25.04.2017 / 12:03
2
answers

How can I filter both by Category and by Price?

I have 2 filter buttons: Sort by price - That works. Sort by Category - Does not Work. I would like to run the filter both by price and by category. Both are modal and I'm doing the following: O Sort by price: View strand cal...
asked by 01.11.2016 / 13:59
1
answer

Angular 2 with jQuery

Hey guys, I was wondering if using jquery along with angular2 is recommended, or does angular already have native functions for manipulating the DOM as well as jquery? In my case I wanted a simple task. Just change the height of a div: var...
asked by 05.05.2016 / 07:49
1
answer

ngx-bootstrap + angular 6 + datepicker

Hello, I'm using ngx-bootstrap's datepicker for the first time and I'm encountering some difficulties. One of them is that by selecting the desired date, my input is in the exact format I need, as follows: '20 / 12/2018 ', however when I p...
asked by 21.12.2018 / 02:30
1
answer

How can I wrap the object generated by FromBuilder?

I use FormBuilder to generate an object and send it to an API, but the generated object is not quite the format that the API expects. I need to know how to add objects inside objects using FormBuild. I did a "gambiarra" to work, but wanted to kn...
asked by 03.01.2019 / 21:10
1
answer

Div from the right side of the page in the animation

I have a div that is a cell phone and when I go down the page performs the animation but before running the animation this div is getting off the page breaking the whole layuout My div <div class="col-md-5 ml-auto"> <div class=...
asked by 24.05.2018 / 19:40
1
answer

For not waiting to complete request, it continues the count

I'm developing an ionic application and I'm having a problem when looping. In this loop there is a call from a method of a provider, which makes a request put . My problem is that for does not expect the server to return it to conti...
asked by 08.06.2018 / 16:37