In this tutorial, let us learn how to build a simple hello world application using typescript. We will show you how to compile it using typescript standalone compiler (tsc) and run it using Node. Before getting started with the hello world application, you must install Typescript compiler, NodeJs and Visual Studio Code. We covered this in the previous tutorial on how to Install Typescript.
Before we dive into TypeScript, we need to install the required tools and dependencies. In this tutorial, we will learn how to install TypeScript and set up our development environment. We will learn how to Install and run typescript in windows.
The RouterLinkActive is a directive for adding or removing classes from an HTML element that is bound to a RouterLink. Using this directive, we can toggle CSS classes for active RouterLinks based on the current RouterState. The main use case of this directive is to show the user which route they are currently on. You can either make the font bold or apply some background color.
The Angular CanDeactivate Guard determines whether we can navigate away from a route. In this tutorial, we will learn what is CanDeactivate Guard is and how to use it with a simple CanDeactivate example application.