nl_tokens: If the directive has not been initialized yet do so .
pl_tokens: function ( ) { // if it's the first initialization if ( ! isInit ) { var viewValue = ( controller . $modelValue === getTrueValue ( ) ) ; isInit = ! isInit ; // Bootstrap the switch plugin element . bootstrapSwitch ( { radioAllOff : getSwitchAttrValue ( 'switchRadioOff' ) , disabled : getSwitchAttrValue ( 'switchActive' ) , state : viewValue , onText : getSwitchAttrValue ( 'switchOnText' ) , offText : getSwitchAttrValue ( 'switchOffText' ) , onColor : getSwitchAttrValue ( 'switchOnColor' ) , offColor : getSwitchAttrValue ( 'switchOffColor' ) , animate : getSwitchAttrValue ( 'switchAnimate' ) , size : getSwitchAttrValue ( 'switchSize' ) , labelText : attrs . switchLabel ? getSwitchAttrValue ( 'switchLabel' ) : getSwitchAttrValue ( 'switchIcon' ) , wrapperClass : getSwitchAttrValue ( 'switchWrapper' ) , handleWidth : getSwitchAttrValue ( 'switchHandleWidth' ) , labelWidth : getSwitchAttrValue ( 'switchLabelWidth' ) , inverse : getSwitchAttrValue ( 'switchInverse' ) , readonly : getSwitchAttrValue ( 'switchReadonly' ) } ) ; if ( attrs . type === 'radio' ) { controller . $setViewValue ( <mask> . $modelValue ) ; } else { controller . $setViewValue ( viewValue ) ; } } }