In this blog post, we will see how to create a new project and start working with all the concepts in Angular. Some of the pre-requisites to begin with are: – Installed Node.js and Node Package Manager (NPM) – Installed Angular CLI – Visual Studio Code Step 1 is to go to the command prompt… Continue reading Creating your first Angular project
Tag: #javascripttalks
Setting up Development Environment to work with Angular
To begin working in Angular, a typescript-based framework, we need to set up the development environment in our systems. In this blog post, we will see: – How to set up a node development environment (installing Node.js) – Checking the version of installed Node and NPM (Node Package Manager) – Installing Angular CLI – Checking… Continue reading Setting up Development Environment to work with Angular
Route Guards in Angular
We have worked with routing and navigating from one route to another in our previous articles. If you are new to Routing, refer to: Routing in Angular Usages of Route Guards While navigating from one route to another, there are situations when we do not want an unauthenticated user to access a particular route and that… Continue reading Route Guards in Angular
Creating Basic Routes in Angular
Displaying content on different pages, splitting up the content on different pages, creating special authorized access-only pages is what Routing is used for. To create a basic route Angular application, let us start by creating a routing project using Angular CLI like stated below: ng new routedemo –routing In the above command, we simply instructed… Continue reading Creating Basic Routes in Angular
Routing in Angular: Beginners
Traditionally, when we wanted to access a file, we used to ask the server to get that file and then it used to get displayed. Every time a file was retrieved, the page needed to get loaded. However in the modern web applications and due to frameworks like Angular, it has become very simple now.… Continue reading Routing in Angular: Beginners
Using @ViewChild in Angular
A ViewChild is a component, directive, or element as a part of a template. If we want to access a child component, directive, DOM element inside the parent component, we use the decorator @ViewChild() in Angular. To understand this, suppose we have two components, a child and a parent one. Since the child component can… Continue reading Using @ViewChild in Angular
Reusing components with Content Projection in Angular
Want to change the content inside your component and re-use them? Well, That is what we use Content Projection for, in Angular. Let us start by defining what Content Projection is. A feature with the help of which we can have a component with a kind of visual wrapper, and the content inside that wrapper… Continue reading Reusing components with Content Projection in Angular
Beginning with Unit Testing in Angular
Before going on to test our angular code, we need to understand what is a unit test. A Unit test is defined to be a test on a single unit,where unit can be a single class or a group of related classes. There are 2 types of tests we often talk about: – Unit Test… Continue reading Beginning with Unit Testing in Angular
Video – Binding arrays to Tables in Angular
In this video, you will learn about binding arrays to tables in Angular. Do not forget to share feedback. Thanks.
Binding Array to a Table
In this article, we will learn how to bind an array to a HTML table. This means that we want the elements in our array and their attributes to be displayed on the view. For this, we will mainly use some hard-coded data and structure directives like *ngIf and *ngFor. So, initially, if we have… Continue reading Binding Array to a Table