Earlier I posted about creating an Angular 4 app with Visual Studio 2017 and then also talked about upgrading the same Angular 4 app to Angular 5 with Visual Studio 2017. Recently, ASP.NET team released release candidate version of Single-Page Application templates. These templates allow developers to create SPA application based on Angular, React, and React with Redux. At the time of writing this post, the final version is scheduled to release in Early 2018. This post shows how to create an Angular 5 app in 5 steps using dotnet cli. Read More
Category: Angular
Upgrade Angular 4 app to Angular 5 with Visual Studio 2017
Last month, Angular 5 was released with some code breaking changes. You can refer to this post for the list of changes. I was playing with Angular 5 and as part of this learning process; I thought of upgrading one of my previously created Angular 4 app to Angular 5. You can read my post about creating an Angular 4 application with Visual Studio 2017. This post talks about how to upgrade Angular 4 app to Angular 5 with Visual Studio 2017. The steps given in this post are applicable for Angular 4 apps created using Visual Studio 2017, but some of these steps will also apply to Angular 4 apps created using other ways. Read More
How to Set HTML Meta tags using Angular 4
The HTML meta tag provides metadata about the HTML document. Metadata aren’t displayed on the page but are machine parsable. Meta elements are typically used to specify the page description, keywords, author, last modified, and other metadata. The metadata can be used by browsers (how to display content or reload the page), search engines (keywords), or other web services. Meta tags play an important role in SEO. In Angular 4, there is a service named “Meta” that can be used to get and add meta tags. This service can help you to set relevant meta tags based on the active routes, which in turn impacts SEO of your website. This post talks about how to use this service and get/set HTML meta tags using Angular 4. Read More
How to create an Angular 4 app with Visual Studio 2017
Configuring and creating angular apps with Visual Studio is not straightforward as it requires some manual configuration settings and some addition of .config
files. It would be nice to have a ready-made template which would take this pain away and save the time. With Visual Studio 2017, a template is available for creating and running sample Angular application. The template is good enough to get you started with Angular. This post talks about how to create an Angular 4 App with Visual Studio 2017 and how to extend it with a simple example.
Read More
How to bind Click event in Angular 2
In this short post, find out how to bind click event in Angular 2. ngClick
is used in Angular 1.x to bind the click event but things changed in Angular 2. One of the major change in Angular 2 is, that it directly uses the valid HTML DOM element properties and events. So take the HTML event and wrap it with parentheses. So with Angular 2, use (click)
to attach a click event in Angular 2. Read difference between Angular 1.x and Angular 2 to know more about other differences. Read More
Bind RadioButton List in Angular 2
Earlier I posted about how to bind Select DropDown List in Angular 2 and Cascading DropDown List using Angular 2 covering some of the newest features of Angular 2 beta 8 release. And in this post, we will find out how to bind radiobutton list in Angular 2. At the time of writing this post, Angular 2 RC4 is the newest version.
Don’t use hidden attribute with Angular 2
As explained earlier in this post, Angular 2 directly uses the valid HTML DOM element properties and events unlike AngularJS 1.x pre-defined directives. So in place of ng-href
, ng-src
, ng-show
and ng-hide
, Angular 2 uses href
, src
and hidden
properties to get the same result. But don’t use hidden attribute with Angular 2 to show/hide elements. Let me tell you WHY?