Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

bootstrap switch for angular 2 #3973


User avatar
0
Ricavir created

Hi,

I would like to use bootstrap-switch component in my UI. I tried following code from metronic but didn't result :

<div class="form-group">
          <label class="control-label col-md-3">Text</label>
          <div class="col-md-9">
                  <input type="checkbox" class="make-switch" data-on-text="Yes" data-off-text="No">
                   <input type="checkbox" class="make-switch" data-on-text="1" data-off-text="0"> 
          </div>
</div>

I saw bootstrap switch reference in angular.cli and package.json... did you already tried to implement such component ? Do you have any tip on that ? Maybe with an angular directive ?

Cheers


2 Answer(s)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi @Ricavir,

    We don't have any experience about this component. But it seem, this component don't have any documentation. And when I look the metronic code, it is different than your code.

    <a class="postlink" href="http://keenthemes.com/preview/metronic/theme/admin_4/components_bootstrap_switch.html">http://keenthemes.com/preview/metronic/ ... witch.html</a>

    <div class="bootstrap-switch bootstrap-switch-wrapper bootstrap-switch-on bootstrap-switch-mini bootstrap-switch-id-test bootstrap-switch-animate" style="width: 64px;">
    		<div class="bootstrap-switch-container" style="width: 93px; margin-left: 0px;">
    			<span class="bootstrap-switch-handle-on bootstrap-switch-primary" style="width: 31px;">ON</span>
    			<span class="bootstrap-switch-label" style="width: 31px;">&nbsp;</span>
    			<span class="bootstrap-switch-handle-off bootstrap-switch-default" style="width: 31px;">OFF</span>
    			<input checked class="make-switch" data-size="mini" id="test" type="checkbox">
    		</div>
    	</div>
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Ricavir,

    Actually we have used it in notification settings modal, you can check that component to see it's usage.

    Thanks.