Open bootstrap modal on page load angular 2

前端 未结 3 1720
情深已故
情深已故 2021-02-11 01:37

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:12

    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 $;
    

提交回复
热议问题