import {Component, OnInit, ViewChild} from '@angular/core'; import {CanvasComponent} from '../../projects/work-library/src/lib/view/canvas/canvas.component'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.less'] }) export class AppComponent implements OnInit { @ViewChild('cancas') cancas: CanvasComponent; title = 'work-lib'; canvasDrawing = true; presetPoint = { IndexCode: '', DeviceSn: '', Name: '', Rotation: 0, Pitch: 0, FocalLength: 0, DetectArgs: {MaxID: 0, _Items: []}, BizType: '', ImgUrl: 'http://171.221.172.210:6027/image/pic?=d31i5b8e*fa9i=t8-cmb288--9d832859d344cicb9*=*d2d0i*s1d=i3p2p=*e0i04cbes=-53z743d4', presetPointIndex: '' }; constructor() { } ngOnInit(): void { // console.log(this.stack); // console.log(this.stack.items); // for (let i = 0; i < 100; i++) { // this.stack.push(i); // } // console.log(this.stack.items); // console.log(this.stack.items); } test(): void { console.log(this.cancas.returnCarBoardLabels()); } }