2

I have such page module:

import { NgModule, LOCALE_ID } from '@angular/core';
...

@NgModule({
  imports [
  ...
  ],
  declarations [
  ...
  ],
  entryComponents [
  ...
  ],
  providers [
  {provide: LOCALE_ID, useValue: localStorage.getItem('localization')}
  ]
})

And when I come to page, my LOCAL_ID gets the value from localStorage. But if my item in locaLstorage gets change, LOCAL_ID is not updating. How to do that?

4

1 に答える 1