Home » Javascript » Angular2 cli asset folder not compiled automatically when updated

Angular2 cli asset folder not compiled automatically when updated

Posted by: admin October 29, 2018 Leave a comment

Questions:

I have created new project using angular-cli.Inside asset folder i have created images folder. After that in app.component.html i have added following line

<img src="assets/images/zz.png">

i didn’t put zz.png in images folder till now, after that i run ng-serve command,

Once appication ran image is not showing.. which is obvious,now i pasted zz.png inside images folder.

My issue is still image is not displaying,i need to stop and re-run ng-serve command again to show image.

so basically i want webpack should compile automatically if i made some changes in assests folder also.

How to acheive this.

Thanks

Answers: