<commit_before>import {Component, OnInit} from "@angular/core";
import {Bookmark} from "../model/bookmark";
import {Observable} from "rxjs";
import {List} from "immutable";
import {UserBookmarkStore} from "./store/UserBookmarkStore";
import {ActivatedRoute, Router} from "@angular/router";

@Component({
  selector: 'my-user-bookmarks',
  templateUrl: './user-bookmarks.component.html',
  styleUrls: ['./user-bookmarks.component.scss']
})
export class UserBookmarksComponent implements  OnInit{

  userBookmarks: Observable<List<Bookmark>>;

  constructor(
    private route: ActivatedRoute,
    private router: Router,
    private userBookmarkStore: UserBookmarkStore) { }

  ngOnInit(): void {
    this.userBookmarks = this.userBookmarkStore.getBookmarks();
  }

  goToAddNewPersonalBookmark(): void {
    let link = ['./new'];
    this.router.navigate(link, { relativeTo: this.route });
  }
}
<commit_msg>add zone to personal user bookmarks<commit_after>import {Component, OnInit, NgZone} from "@angular/core";
import {Bookmark} from "../model/bookmark";
import {Observable} from "rxjs";
import {List} from "immutable";
import {UserBookmarkStore} from "./store/UserBookmarkStore";
import {ActivatedRoute, Router} from "@angular/router";

@Component({
  selector: 'my-user-bookmarks',
  templateUrl: './user-bookmarks.component.html',
  styleUrls: ['./user-bookmarks.component.scss']
})
export class UserBookmarksComponent implements  OnInit{

  userBookmarks: Observable<List<Bookmark>>;

  constructor(
    private zone:NgZone,
    private route: ActivatedRoute,
    private router: Router,
    private userBookmarkStore: UserBookmarkStore) { }

  ngOnInit(): void {
    this.userBookmarks = this.userBookmarkStore.getBookmarks();
    this.userBookmarks.subscribe(
      res => {
        this.zone.run(() => {
          console.log("ZONE RUN for initial load of bookmarks");//need to investigate this, or merge it with the async list stuff....
        });
      });
  }

  goToAddNewPersonalBookmark(): void {
    let link = ['./new'];
    this.router.navigate(link, { relativeTo: this.route });
  }
}

{'fraction_non_alphanumeric': 0.13865147198480532, 'fraction_numerical': 0.0, 'mean_word_length': 4.334177215189873, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '128843', 'n_tokens_mistral': 648, 'n_tokens_neox': 642, 'n_words': 153}