Create immutable storage
This commit is contained in:
parent
72eaca7a3b
commit
ca0bf943f7
8 changed files with 229 additions and 8 deletions
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue