Angular tutorial - Setup environment.


Just went through John Papa AngularJs first look tutorial.

I guess the best way to get people started is to get your environment ready.  Download from here.

Make sure you have npm installed and run the following command :-

npm install


In this tutorial, we are going to use typescript as our primary development js language.

Let's go create a really simple component. Angular2 requires @Component in your es6 module.



Our view looks like this. It's pretty simple, all you need is a uniquely named html markup to specify where you need to load it.




Next we need to create a separate file that binds our component together.




That's all you need to create a simple component.



Further reference:-

What are the attribute / property available under @Component.? Well I'm glad you ask that question. You can get all the answer here.

We have

1. viewProviders
2. template
3. templateUrl
4. styles
5. styleUrls
6. directives
7. pipes





Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm