New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@henry781/ngx-terminal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@henry781/ngx-terminal

This component is a basic easy to use fake terminal for Angular.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

NGX Terminal

This component is a basic easy to use fake terminal for Angular.

Usage

component.html

<ngx-terminal [login]="login" [server]="server" (command)="onCommand($event)"></ngx-terminal>

component.ts

  public server = 'localhost';
  public login = 'henry781';

  onCommand(prompt: TerminalPrompt) {
    switch (prompt.getCommand()) {

      case 'whoami':
        prompt.response = prompt.login;
        prompt.responseComplete();
        break;

      default:
        prompt.response = 'unknown command';
        prompt.responseComplete();
    }
  }

module.ts

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    TerminalModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {
}

Features

Autoscroll

This terminal supports autoscroll when the scroll position is at the end of the page. It can be disabled using the input autoscroll="false".

History (Up & Down)

Keyboard keys ↑ and ↓ allows to navigate in the command history.

Ansi color

There is a peer dependency with lib ansi_up.

Asynchronous response

HTML response

FAQs

Package last updated on 30 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc