how to use in angular2 app (service)
See original GitHub issueI have angular2 service that must provide tty console to some vm. How can i import xterm only for this service ? If i write import { Xterm } from ‘xterm’; i get error
ERROR in ./src/app/ttycon.service.ts Module build failed: Error: /var/home/vtolstov/devel/panel/src/app/ttycon.service.ts (2,10): Module '"/var/home/vtolstov/devel/panel/node_modules/@types/xterm/index"' has no exported member 'Xterm'.)
at _checkDiagnostics (/var/home/vtolstov/devel/panel/node_modules/@ngtools/webpack/src/loader.js:116:15)
at /var/home/vtolstov/devel/panel/node_modules/@ngtools/webpack/src/loader.js:141:17
@ ./src/app/ttycon/ttycon.component.ts 11:0-50
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi main
I have installed xterm and @types/xterm
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Angular 2 - Services - Tutorialspoint
First, we import our appService module in the appComponent module. · Then, we register the service as a provider in this module. ·...
Read more >Add services - Angular
When you provide the service at the root level, Angular creates a single, shared instance of HeroService and injects into any class that...
Read more >Getting started with Angular 2 Application | Pluralsight
Create a scaffolded app with proper directory structure and included tests, with one simple command ( ng new ). · Generate components, routes, ......
Read more >How to run a service when the app starts in Angular 2
I know the code in SocketService's constructor() only starts to run when a component use SocketService. And usually the code in app.ts looks ......
Read more >Building and Deploying an Angular 2 CLI project to Azure App ...
We appear to need a web.config to get app services to go with just angular 2, but I haven't needed to put any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
import * as xterm from ‘xterm’ Works
@Tyriar How about importing addons?