10 examples of 'angularjs toggle button' in JavaScript

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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
40public 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}
75toggle() {
76 this.$.toggle.toggle();
77}
75scope.toggle = function toggle() {
76 if(!scope.disabled) {
77 scope.model = !scope.model;
78 ngModelCtrl.$setViewValue(scope.model);
79 }
80};
21function dropdownToggle(button_element) {
22 button_element.nextElementSibling.classList.toggle("dropdown-menu-show");
23}
310function ToggleButton(config) {
311 ButtonWidget.superclass.constructor.apply(this, arguments);
312}
49ngOnDestroy() {
50 this.togglerRef.removeRef();
51 this.panelStateSubscription.unsubscribe();
52}
35@Input() set toggle(toggle: boolean) {
36 this.opened = toggle;
37}
22select() {
23 this.selected = true;
24}
38onClick(selected) {
39 this.$scope.setupModelController.$setViewValue(selected);
40}
29constructor(private el: ElementRef) {
30 this.checkedSubscription = fromEvent($(this.el.nativeElement), 'change')
31 .subscribe((e: any) => this.ngModelChange.emit(e.target.checked));
32}

Related snippets