These are chat archives for angular/angular-2-ionic-2

28th
Oct 2018
UncertaintyP
@UncertaintyP
Oct 28 2018 17:40
Both, Firefox and Chrome have errors preventing the home page from loading correctly (list page is working but useless for your question)
just10minutes
@just10minutes
Oct 28 2018 17:44
@UncertaintyP you have to click on home.page.ts do a simple resave of the this file map will come up
I don't know why this comes up after resave of the home.page.ts
it complains actually saying it cannot find name google, but resave makes the error go away
I am looking for a solution where i click the button and direction is shown after the click, right now changing the start or end position makes it to show the direction
UncertaintyP
@UncertaintyP
Oct 28 2018 17:52
So the reason that it logs "5 Simmonds" is because you listen to the change event listener (very fast because its local). The request to google is async, over network and thus slower. If you wrap the whole content of calculateAndDisplayRoute in a setTimeout you see the effect
To achieve what you want remove the calls of calculateAndDisplayRoute from (change) event listener in your html template as well as in both your place_changed event listeners
just10minutes
@just10minutes
Oct 28 2018 17:59
Thank you for your input, now trying setTimeOut,
just10minutes
@just10minutes
Oct 28 2018 18:09
I gave three seconds gap still it prints only the value which I entered not the full address which I sleected
just10minutes
@just10minutes
Oct 28 2018 18:19
@UncertaintyP any more idea?
UncertaintyP
@UncertaintyP
Oct 28 2018 18:19
Because you commented out these lines 'this.end = endPlace.formatted_address;'
just10minutes
@just10minutes
Oct 28 2018 18:19
oh like that
Oops I thought it will be taken from the search box :( sorry for that, now uncommenting those lines
UncertaintyP
@UncertaintyP
Oct 28 2018 18:20
You don't need setTimeout if you only run calculateAndDisplayRoute on your button click then
just10minutes
@just10minutes
Oct 28 2018 18:23
Awesome, Thanks a lot , I have spent more than 36 hours on this and you helped me resolving this. Wish you were here yesterday :)
UncertaintyP
@UncertaintyP
Oct 28 2018 18:24
Awesome, no problem :D
just10minutes
@just10minutes
Oct 28 2018 18:28
Now my concentration on adding waypoints by providing dynamic forms, I hope i pass in this else will come back here