Creating your first AngularJS Client
AngularJS is an open source JavaScript Model-View-Whatever (MVW) framework, which lets us build well-structured, easily testable and maintainable browser-based applications.
In this recipe, we will learn to create an AngularJS with TypeScript 2 client to send a POST
request to the HTTP server running locally.
Getting ready…
As we have already created an HTTP server that accepts both GET
and POST
requests in one of our previous recipes, we will be using the same code base as our HTTP server.
Also, this recipe assumes you have Angular2 CLI installed on your machine. If not, install it by executing the following command:
$ npm install -g @angular/cli
Note
See the Creating your first HTTP POST method recipe.
How to do it…
- Create a new project and skeleton application by executing the following command:
$ ng new angularjs-client
- Move to the
angularjs-client
directory and createserver.go
by executing the following command:
$ cd angularjs-client && touch server...