Skip to content

Autocomplete not initialising on route change. #293

@jpike88

Description

@jpike88

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions