10 examples of 'ng disabled angular 2' in JavaScript

Every line of 'ng disabled angular 2' 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
this disclaimer
357function defaultLinkFn(scope, element, attr) {
358 scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {
359 attr.$set(attrName, !!value);
360 });
361}
Important

Use secure code every time

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

55setDisabledState(isDisabled: boolean): void {
56 this._disabled = isDisabled;
57 this._updateRadiosDisabled();
58}
71setDisabledState(isDisabled: boolean): void {
72 this.disabled = isDisabled;
73 this._label.disabled = isDisabled;
74}
278setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; }
19ngOnDestroy() {
20 this.lazyLoader.destroy();
21}
53get transclude() {
54 return this._annotation.transclude;
55}
271function bindToKNgDisabled(widget, scope, element, kNgDisabled) {
272 if ((kendo.ui.PanelBar && widget instanceof kendo.ui.PanelBar) || (kendo.ui.Menu && widget instanceof kendo.ui.Menu)) {
273 $log.warn("k-ng-disabled specified on a widget that does not have the enable() method: " + (widget.options.name));
274 return;
275 }
276 scope.$apply(function() {
277 scope.$watch(kNgDisabled, function(newValue, oldValue) {
278 if (newValue != oldValue) {
279 widget.enable(!newValue);
280 }
281 });
282 });
283}
16private set md2Transclude(templateRef: TemplateRef<any>) {
17 this._md2Transclude = templateRef;
18 if (templateRef) {
19 this.viewRef.createEmbeddedView(templateRef);
20 }
21}
249set disabled(value: any) {
250 this._disabled = value === '' || (value && value !== 'false');
251
252 if (this.isOpen()) {
253 this._cRef.instance.setDisabledState(this._disabled);
254 }
255}
26function dynamicNameDirective($compile) {
27
28 return {
29 restrict: 'A',
30 terminal: true,
31 priority: 100000,
32 link: link
33 };
34
35 function link(scope, element) {
36 var name = element.attr('dynamic-name');
37 element.removeAttr('dynamic-name');
38 element.attr('name', name);
39 $compile(element)(scope);
40 }
41}

Related snippets