如何为我的项目启用远程控制台(以角度编写)?

时间:2019-06-28 12:02:17

标签: node.js angular6

在我的应用程序中,我想打开终端。像Visual Studio程式码一样 如果我们打开新项目,则必须打开与该路径相关的终端。我只能得到终端,而该终端上没有任何命令。

我将ng-terminal用作终端机,但是该命令不起作用

app.componet.ts

import { Component, AfterViewInit, ViewChild } from '@angular/core';
import { NgTerminalComponent } from 'ng-terminal';
import { NgTerminal } from 'ng-terminal/lib/ng-terminal';``

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements AfterViewInit {
 title = 'ter';
@ViewChild(NgTerminalComponent) child: NgTerminal;

 ngAfterViewInit(){
/  /this.invalidate();
  this.child.keyInput.subscribe((input) => {
    this.child.write(input);
  })
 }

 }
  app.component.html

   <ng-terminal></ng-terminal>

0 个答案:

没有答案