Create immutable storage

This commit is contained in:
schmelczerandras 2019-08-31 14:24:54 +02:00
parent 72eaca7a3b
commit ca0bf943f7
8 changed files with 229 additions and 8 deletions

View file

@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { ModalService } from './services/modal.service';
import { Cloneable } from './storage/cloneable';
import { Root } from './storage/root';
@Component({
selector: 'app-root',
@ -8,4 +9,19 @@ import { ModalService } from './services/modal.service';
})
export class AppComponent {
title = 'frontend';
constructor() {
const root = new Root<Cloneable>();
const l1 = new Cloneable(root, 'l1');
const r1 = new Cloneable(root, 'r1');
const r1r1 = new Cloneable(r1, 'r1r1');
const r1l1 = new Cloneable(r1, 'r1l1');
r1r1.changeName('r1r1 new');
r1l1.changeName('r1l1 new');
r1l1.map((c: Cloneable) => c.changeNameMap('bdeiwf'));
}
}