Project

General

Profile

« Previous | Next » 

Revision 61423

Added by John Balasis 6 months ago

Angular upgrade to v12

View differences:

shared.service.ts
1
import { Injectable } from "@angular/core";
2
import { Repository, RepositorySnippet } from "../domain/typeScriptClasses";
3
import { Subject } from "rxjs/internal/Subject";
1
import {Injectable} from '@angular/core';
2
import {Repository, RepositorySnippet} from '../domain/typeScriptClasses';
3
import {Subject} from 'rxjs/internal/Subject';
4 4

  
5 5
@Injectable()
6 6
export class SharedService {
......
12 12
  private repositoriesOfUser: Subject<RepositorySnippet[]> = new Subject<RepositorySnippet[]>();
13 13

  
14 14

  
15

  
16 15
  get repository$() {
17 16
    return this.repository.asObservable();
18 17
  }
......
21 20
    return this.repositoryCopy;
22 21
  }
23 22

  
24
  setRepository(data:Repository) {
23
  setRepository(data: Repository) {
25 24
    this.repository.next(data);
26 25
    this.repositoryCopy = data;
27 26
  }

Also available in: Unified diff