Every line of 'angularjs toggle button' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
40 public toggle(button: MToggleButton): void { 41 this.$emit('change', this.buttons.map(b => b.id !== button.id ? 42 this.multiple ? b : { ...b, pressed: false } : 43 { ...b, pressed: !b.pressed } 44 )); 45 46 this.onClick({ ...button, pressed: !button.pressed }); 47 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
75 toggle() { 76 this.$.toggle.toggle(); 77 }
75 scope.toggle = function toggle() { 76 if(!scope.disabled) { 77 scope.model = !scope.model; 78 ngModelCtrl.$setViewValue(scope.model); 79 } 80 };
21 function dropdownToggle(button_element) { 22 button_element.nextElementSibling.classList.toggle("dropdown-menu-show"); 23 }
310 function ToggleButton(config) { 311 ButtonWidget.superclass.constructor.apply(this, arguments); 312 }
49 ngOnDestroy() { 50 this.togglerRef.removeRef(); 51 this.panelStateSubscription.unsubscribe(); 52 }
35 @Input() set toggle(toggle: boolean) { 36 this.opened = toggle; 37 }
22 select() { 23 this.selected = true; 24 }
38 onClick(selected) { 39 this.$scope.setupModelController.$setViewValue(selected); 40 }
29 constructor(private el: ElementRef) { 30 this.checkedSubscription = fromEvent($(this.el.nativeElement), 'change') 31 .subscribe((e: any) => this.ngModelChange.emit(e.target.checked)); 32 }