I make a site with Angular 2 and will add a JavaScript file to the component. This script must render the height of some images equal to the height of the window of the browser.
How could I add this script to the component?
The solutions I found on SO or anywhere else, looks like this:
import './home.component.js';
But it's not what I need! I need this in my home.component.ts file:
@Component({
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
jsUrls: ['./home.component.js']
})
or something...
Update 1: In my site I use Angular CLI and TypeScript.
Update 2: You could find my project on GitHub: https://github.com/WatchFriends/Web
Argument of type '{ templateUrl: string; styleUrls: string[]; script: string[]; }' is not assignable to parameter of type 'Component'.by usingscriptorscripts.