Good I have the doubt as I can use for example a variable declared in js in an external file and use it in angular cli example:
@angular/cli: 1.7.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0
archivo.js
function myFunction(){
var variable
}
communicate with componente.component.ts
I was seeing many answers for example in the component file import something like this
import * as xJS from '../../../assets/js/archivo.js';
to use it but it does not work the component file is in another external folder.
Would you like to know if there is a way? just call it or call the function for example import variable from "archivo.js"
or function