Angular cli is a useful toolset which helps in development,testing and deployment of Angular applications. Check if cli is installed ng –version Install latest version of angular cli npm install -g @angular/cli@latest Create new Angular project using cli 1.Create folder where you want to create Angular application 2.Open command prompt and navigate to the above […]
Delegates in C#
There are different types in C# such as class,interfaces and enums.One of the reference type is delegate.Delegate allows to define objects which can point to a function.This makes it convenient to define decoupled application and pass function as a parameter value to other functions. For example if you define a delegate called ProcessDelegate then you […]
Router Guard in Angular
Route Guards determine whether to allow or deny navigation within Angular application. There are 4 types of routing guards in Angular: CanActivate Determines if a route can be activated CanActivateChild If route children can be activated CanLoad If lazy loaded child routes can be loaded. CanDeactivate Determines if the user can navigate away from route […]
Using dotnet publish command
The dotnet publish command compiled the dotnet core application and writes the output to a folder.The contents of this folder could be deployed.So effectively dotnet publish command publishes the compiled output along with the application dependencies.If you are in the root folder of your application then you can issue the command dotnet publish this will […]
ASP.NET Core dependency injection
What is Dependency Injection in ASP.NET Core ASP.NET Core provides a simple prebuilt DI container.We need to register the dependencies in this container.Dependencies could be the custom classes or the framework classes Once you have registered the dependency in the container you can inject it anywhere you need.The DI container will automatically inject the dependencies […]