Disabled directive in angular

Problem: When using reactive form in angular disabled property binding does not work in template. Solutions: Using disable method programmatically in form control. Create directive In my case I couldn’t use disabled since my input is not a control in form. It’s just a input in template. So I created directive. You can find it here. It might help some one having my requirement. Live demo import { Directive, ElementRef, Input } from ‘@angular/core’; import { OnChanges } from ‘@angular/core/src/metadata/lifecycle_hooks’; /** * Directive for add disable attribute to input element * Eg: [appInputDisabled]=”isDisabled” * @export * @class InputDisabledDirective * @implements {OnChanges} */ @Directive({ selector: ‘[appInputDisabled]’ }) export class InputDisabledDirective implements OnChanges { @Input() appInputDisabled: boolean; constructor(private el: ElementRef) { } ngOnChanges(): void { this.el.nativeElement.disabled = (this.appInputDisabled) ? true : false; } } Source code here …. Code on stackblitz

Calling web service from sql server using sql clr

Problem : In my previous project I was been asked call web service from sql server stored procedure. So I get it done using SQL CLR. So using CLR we can run managed code inside sql server. Code that runs within the CLR is referred to as managed code. We can create stored procedures, triggers, user defined types, and user-defined aggregates in managed code. We can achieve significant performance increases because managed code compiles to native code prior to execution. We can use SQL CLR in in SQL Server 2005 and later. Why Sql CLR in sql server: In some cases some tasks are not possible by T-SQL as my requirement. So in that point we can go with SQL CLR. What tools I have used in this post Visual Studio 2015 Sql Server 2014 In Action: Create SQL Server Database project in VS 2015 Add SQL CLR C# Stored Procedure Name stored procedure As CallWebService 3. Add C# codes

read more Calling web service from sql server using sql clr