To add jQuery in Angular CLI/angular5

npm install jquery

add index.html

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>

for import component where you used:

import * as $ from 'jquery'; //any exmaple $("button").click(function(){ $(".register").fadeOut(); setTimeout(function(){$(".register").fadeIn();}); });

Last updated

Was this helpful?