Answer the question
In order to leave comments, you need to log in
Connecting external javascript in angular 2?
Faced with the fact that it is necessary to connect external javascript to an application on angular 2. Actually, the question is, how is this implemented?
Answer the question
In order to leave comments, you need to log in
The question is not clear. If it's a package in node_modules/bower_components and not ES6 - then something like:
import * as Raphael from 'raphael'; // для класса
import 'annyang'; // для глобального объекта
declares interface Raphael {
constructor(options: any);
...
}
declare namespace annyang {
function start(): void;
function pause(): void;
function abort(): void;
function isListening(): boolean;
function addCommands(commands: Object): void;
function addCallback(type: string, callback: (arg: any) => void )
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question