Two way binding applied to slowly to front page

<ion-input id="test" [(ngModel)]="startPoint" clearInput>{{startPoint}}</ion-input>



whener I clicked map on map.ts, It detect and send address to home.html by @Output decorator
as soon as I clicked map, It ouput quite fastly, so I can see address in console.lov(v) .
till here, Where aren’t any problem.

but new_addresss isn’t applied to front page 's value.
It may take 5~ 15sec… How can I make this more faster…?

     import {NgZone} from '@angular/core'

     export class SomePage {
           constructor(public zone : NgZone){
                       //whatever code you want to run faster 

Please don’t follow the advice in the previous post. If you are manually dealing with zones, something is broken somewhere.

joshmorony suggested using NgZone if you were running code outside of angular’s zone, causing the UI to not update fast enough. Because @pdj is using a map just like I did, and is facing the same issue that I did, I didn’t think it any harm to give him the same solution that worked for me : forcing code to run inside angular’s zone, especially when working with maps, where code seems to be running outside of Angular’s zone.

I don’t think anything is necessarily broken. Maybe angular loses scope when you’re using the map. If you can come up with a better fix than this, I think we would all appreciate it. If you can’t, then let’s not plead people to not implement something that works for them.

I suggest not running code outside angular’s zone. This is 95% of why ionic-native exists in the first place.

This attitude gets people in techdebt. Use futures that are zone-aware, such as Promises and Observables, and move the logic that generates them out of pages and into providers.

How are you supposed to run code inside angular’s zone if you’re using a google maps API ? Does ionic-native have a maps plugin? I don’t think so. So you will have to run your code outside of angular’s zone and force it to run IN angular’s zone using ngZone

And again, I’m asking, if you have a better solution, I plead you to share it with all of us. If you had an answer, a better one, by all means, advertise it over mine. Otherwise, I don’t think it makes any sense to shun somebody else’s answer

According to the docs they do

It’s a not a plugin that ionic created

I’m not quite sure what you mean.

The map service is fundamentally provided by google, right?

Sure. But, this is Ionic having a google maps plugin. One that would run inside of angular’s zone, which as @rapropos said is 95% of the reason for Ionic Native.

That definitely makes sense. My bad on that. But maybe pdj isn’t using that plugin for his map. So why is it wrong to show him/her how to force code to run inside angular’s zone when it very well may be for this reason?