As I mentioned in the last post, this post is about client side implementation. Hope you have a basic understanding about Angular JS. If not, please have look into the Angular JS tutorial page. Angular JS comes with two Ajax implementations to communicate to server. One $http and $resource. In this post I am using $http service.
Here is my Angular module
Here is my controller, which is interacting with the ASP.NET 5 REST Service.
In the first line, Angular JS will inject the $scope and $http services to the controller, scope is the glue between application controller and the view. And the http service will help the client app to interact with Service. And in the HTML you need to assign the App and controller.
In this code I am disabling the submit button, if the form is not valid. And I am using ng-submit, which will invoke the CreateToDo method when the form is getting submitted.
And here is the app running on my system.
In the next post I will try to cover unit testing in Angular JS.
Did you like this article? Share it with your friends