0

I have a template in HTML and CSS and Javascript. I split HTML and CSS to components but I cannot adopt javascript to angular.

how to add plugin javascript to angular 2

1

2 Answers 2

0

You can call the javascript functions from the component typescript file see: Angular 2 typescript invoke javascript function

Sign up to request clarification or add additional context in comments.

Comments

0

You may import the javascript library within your main index.html file and call it from an angular2 component. However that doesn't mean automatically it will work, as e.g. DOM-manipulation is done differently in Angular2, e.g via the templates.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.