Open bootstrap modal on page load angular 2

前端 未结 3 1493
醉梦人生
醉梦人生 2021-02-11 01:46

I am working on an angular2 project and I have 2 components namely: home and first.

My home.component.html is as below :-

3条回答
  •  囚心锁ツ
    2021-02-11 02:11

    Add jquery cdn to the head of your index.html. Something like this:

    
    

    Don't forget to declare var $ at the top of your .ts file before @Component decorator .i.e.

    declare var $;
    

提交回复
热议问题