import { NgModule } from '@angular/core'; import { NgTerminalModule } from 'ng-terminal'; import { AppComponent } from './app.component';
@NgModule({ declarations: [ AppComponent ], imports: [ NgTerminalModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
import { Component, ViewChild } from '@angular/core'; import { NgTerminal } from 'ng-terminal';
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { @ViewChild('term', {static: false}) child: NgTerminal; title = 'app'; ngOnInit() { this.child.write('Hello World!'); } }