Home > Back-end >  How to use Bootstrap tab in Angular?
How to use Bootstrap tab in Angular?

Time:07-18

I am trying to use Bootstrap tab but it is not working in Angular app. It seemed quite easy as used Bootstrap previously but can't work around in this Angular app. It displays content of both the tabs and the links do not work properly. P.S I am not using NG Bootstrap

  <ul >
  <li >
    <a  aria-current="page" href="#tab1"  data-toggle="tab">Active</a>
  </li>
  <li >
    <a  href="#tab2"  data-toggle="tab">Link</a>
  </li>
</ul>

        <div ">
      <div  id="tab1">
            <div >
            <div >
               <h4>Tab 1</h4>
        <p>content</p>
       </div>
             </div>
           </div>
          <div  id="tab2">
         <div >
       <div >
        <h4>Tab 2</h4>                     
       <p>Content</p>
               </div>
          </div>
         </div>
       </div>

CodePudding user response:

It has worked after using the link from CDN for Jquery and Bootstrap.js. So the url of the directory wasn't right.

  • Related