Skip to content

How to import custom js and load in OnInit()  #5249

@sudhakarsukumar

Description

@sudhakarsukumar

I need to send values to function print() in hello.js
and work on it

import { Component, OnInit } from '@angular/core';
import * as hello from "./hello.js";

@component({
selector: 'hello',
templateUrl: 'hello.component.html'
})

export class ChartsComponent implements OnInit {

ngOnInit() {
$.print("hello");
}
}

error is
Property 'print' does not exist on type 'JQueryStatic'.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions