Many people have questions regarding observable subscriptions (or executions) :- What is meant by unsubscribing an observable execution? Do we need to unsubscribe? When and how should we unsubscribe? etc. Its always the what, why, when and how that we need to know and that describes everything. So I will follow the obvious sequence to answer these questions.
Get I.T. Going
Angular 6 Template-driven form with multiple components
In this post I am gonna show you how to create an Angular 6 Template-driven form that spans across multiple components.
Passing value from one observable to another in RxJS
While creating a web application using RxJS such as an Angular 2/4/6 application, you might come across situations in which you need to pass value from one observable to another dependent observable and then utilize the final result into the application. For example you may want to send an ajax request based on the result of another ajax request and then show the result of second request on the UI.
Providing mock services in angular 2/4/6 unit test
When you are writing unit tests for a component or a service that depends on another service then it is better to provide test alternatives for that service instead of the real service, as the real service might in turn depend on some other services or it might try to send some request to the server etc. Moreover our purpose is to test the component or service under consideration not its dependencies.
Acquire services dynamically (or generically) in Angular 2+
Acquiring a service dynamically through injector in Angular 2(+) is pretty straightforward. All you have to do is inject the Injector itself into the component's constructor instead of the services and then get the service instance by using the injector.get() method.
Adding CSS style sheet to angular CLI project
Here I am gonna demonstrate you how to add CSS style sheets to angular CLI project. Let's say we need to add bootstrap.css into our angular cli project, so here is how you can do that in different ways.
There are two ways to add bootstrap styling to angular 4 project one is by installing the bootstrap node package and the other is by using the CDN (Content Delivery Network) for providing bootstrap files. Both of these methods are illustrated below.
There are two ways to add bootstrap styling to angular 4 project one is by installing the bootstrap node package and the other is by using the CDN (Content Delivery Network) for providing bootstrap files. Both of these methods are illustrated below.
Deploying angular 4 application in IIS
There are 2 ways for deploying an angular app in IIS, one is as a separate web application and the other as a sub application to an existing web site(Default Web Site in this tutorial). Both of these methods are illustrated below one by one:-
Using async - await in different scenarios
While using asynchronous programming you might come across different scenarios. A few of those are explained here briefly.
async & await in C#
"async" and "await" are language level constructs in C# used for asynchronous programming. Keywords "async" and "await" and types Task and Task<T> together constitute the task based async model in .NET.
as and is in C#
These keywords are used in scenarios where there is compatible type conversion or we need to check for type compatibility.
Collate in SQL Server
Collate specifies the set of rules that are used during various comparisons, sorting etc. For example it specifies whether the comparisons should be case sensitive or not etc.
Lazy loading in koGrid
Below is the code for implementing Lazy loading in koGrid. Here is a working plunker. You can download the code from here.
KoGrid with server side paging, sorting and filtering
Here is the code for implementing server side paging, sorting and filtering in koGrid (a.k.a. knockout grid). To see how to implement lazy loading in koGrid follow the link.
Squashing commits in git(through Visual Studio)
I am gonna tell you how to squash commits in Git through Visual Studio but the steps are same for any git command line.
Committing against a workitem in VSTS
The detailed steps for creating a workitem in VSTS and committing against it in Git version control system are provided below :-
Using Git with VSTS
Below are the steps to get started with VSTS with Git as the version control system.
Sorting in Angular js controller (along with paging)
Considering the problem of sorting only a handful of items that are on the current page, I guess sorting using the "orderBy" filter inside ng-repeat tag is not a good idea. So the solution is to apply sorting in AngularJS controller and here is how you can do that.
Sorting in Angular JS along with paging - (in View)
Below is the code for applying sorting in Angular js table along with paging applied. In this code the sorting is done on the view only i.e. sorting is done using attributes in the ng-repeat tag itself.
Comparitive study of AngularJS, KnockoutJS and ReactJS
Here is a high level comparison of AngularJS, KnockoutJS and ReactJS. Going through this comparison might just help you in deciding which framework/library to choose for your project.
Accessing properties and methods of an object in C# using Reflection
There might be situations where you want to loop through the members of an object or you want to create some generic means to access the members of one or more classes, so here is how you can access the members of an object in C# in a generic manner.
Drag and Drop using jquery ui
Here is a small sample that demonstrates the use of jQuery UI's drag and drop functionality
Using Authorize attribute in .NET MVC with custom authentication
Here is how you can use Authorize attribute in .NET MVC to authenticate and authorize user requests.
Calling a Oracle S.P. that is returning REFCURSOR through Entity Framework
Here are the steps for how to call Oracle S.P. that is returning REFCURSOR through Entity Framework :-
Restrict desktop application to single instance using MUTEX
Here is the code to restrict a desktop application to single instance (for creating single instance per user application follow the link).
Single instance per user of desktop application (.NET)
Here is the code to restrict a desktop application to single instance per user (for single instance desktop application follow the link).
Uploading file using ajax and wcf rest
The simple implementation to upload a file using ajax to wcf rest service is explained as:-
Hide Bootstrap Datetimepicker Decade view
Many people want to hide Bootstrap Datetimepicker's decade view. Here's the simplest way to do this...
Subscribe to:
Posts (Atom)