Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Storage not working #98

Open
sysmat opened this issue Jun 13, 2023 · 0 comments
Open

[BUG] Storage not working #98

sysmat opened this issue Jun 13, 2023 · 0 comments
Assignees

Comments

@sysmat
Copy link

sysmat commented Jun 13, 2023

馃悶 Bug report

Description

  • project demo is broken
  • I try from example but not working

Reproduction

"@ng-web-apis/common": "^2.1.0",
"@ng-web-apis/geolocation": "^2.0.0",
"@ng-web-apis/storage": "^1.0.0",
@Component({
  selector: 'app-web-api',
  standalone: true,
  imports: [CommonModule],
  template: `
    <p>
      web-api works!
    </p>
    <div *ngIf="geolocation$ | async as position">
      <span>{{position.coords.latitude}}</span>
    </div>
    <div>
      BUG: Value from storage not working
      <code *ngIf="value$ | async as store">STORAGE_EVENT: {{ store }}</code>
    </div>

  `,
  styles: [
  ]
})
export class WebApiComponent {

  readonly geolocation$ = inject(GeolocationService);
  readonly value$ = this.event$.pipe(filterByKey('tomaz'), toValue());

  constructor(
    @Inject(STORAGE_EVENT) private readonly event$: Observable<StorageEvent>,
    @Inject(LOCAL_STORAGE) private readonly storage: Storage,
    @Inject(StorageService) private readonly storageService: Storage) {}

}

Expected behavior

  • to see value from storage

Versions

  • OS: Windows
  • Browser chrome
  • Angular: 16

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 馃挕 Backlog
Development

No branches or pull requests

2 participants