How to use code to open a modal in Angular 2?

前端 未结 14 2976
天涯浪人
天涯浪人 2020-12-05 04:34

Usually we use data-target=\"#myModal\" in the

14条回答
  •  -上瘾入骨i
    2020-12-05 04:58

    I do not feel there is anything wrong with using JQuery with angular and bootstrap, since it is included when adding bootstrap.

    1. Add the $ right after the imports like this


    import {.......
    
    declare var $: any;
    
    @component.....
    
    1. modal should have an id like this

提交回复
热议问题