map icon indicating copy to clipboard operation
map copied to clipboard

Autocomplete not initialising on route change.

Open jpike88 opened this issue 5 years ago • 0 comments

https://stackblitz.com/edit/ng-map-starter-dmk2kc

I have configured the autocomplete on each page to use the initialize$ hook, in order to set their default country scope (to Australia).

The first time load, you should see 'INITIALIZED!!!' in the console, it works so far. Press the letter F in the field, it should suggest Flinders Street Station (a popular Australian location).

Now go to page 2. This autocomplete does not call the intiialize hook, the console shows nothing, and it doesn't have a country scope anymore (pressing F has the first result as Frankfurt, Germany).

This renders the autocomplete field next to useless for multi-page uses. Am I doing something wrong here.

UPDATE

This breaks on your demo site!

Go to the places autocomplete page

  • https://ng2-ui.github.io/map/#/places-auto-complete
  • Type in something, select it. It will show in the value.
  • Click to another demo page
  • Go back to places demo page, enter something in, select it. The value doesn't update.

jpike88 avatar Feb 01 '20 17:02 jpike88