Skip to main content
How to Bind Click event in Angular 2

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. (more…)

Read More

Angular CLI is here for AngularJS 2

Angular CLI is here for AngularJS 2

Setting up AngularJS 2 in your application is quite time consuming compare to AngularJS 1. For setting up Angular 1.x, all you need to do is to just add the reference of library but with Angular 2, it requires some more work due to dependency on Grunt or Gulp for build process, TypeScript and it’s compiler. And setting this with Visual Studio 2015 is even more time consuming. Angular Team is aware of this and they came up with a solution and introduced a new command line tool (cli) for AngularJS 2. Yes, Angular CLI is here for AngularJS 2 applications.
(more…)

Read More

Cascading DropDown List with ASP.NET Core WEB API and AngularJS 2

Cascading DropDown List with ASP.NET Core WEB API and AngularJS 2

Earlier I posted about Cascading DropDown List using AngularJS 2 and in this post, we take it to next level and implement it with ASP.NET Core Web API and AngularJS 2. But starting/configuring AngularJS 2 with ASP.NET Core is not straight forward and it requires some manual configurations to be done. If you are not sure how to do it, I recommend you to read this helpful post to find out post how to start with AngularJS 2 in ASP.NET Core with TypeScript using Visual Studio 2015.

(more…)

Read More