I have been learning angular2 from past two days. I would like to know how to configure my project to work around with angular2 & typescript. I'm using VS 2015. Please let me know the steps for setting up the environment.
-
1I am a big fan of VS 2015. Having said that, however, I prefer to develop angular2 apps with Visual Studio Code. With VS Code, I install nothing related to .net and use lite-server for development. All backend stuff I do with ASP.NET web api but with a separate project (that the angular app calls via http cross domain request). I don't know if this is "proper" but it works great for me.brando– brando2016-06-07 20:26:48 +00:00Commented Jun 7, 2016 at 20:26
Add a comment
|
2 Answers
Best way to setup angular2 project now a days is by using Angular CLI
also there are alot of ways by using you can setup your project. its totaly depends on you and your requirement that how you want to configure your project setup. see here also angular2 setup using gulp
Before setup your project i must recomend to you go through this article
Update
as required by @sujay in comment here is some info related to required files:-
- package.json :- Holds all the dependenices list which is being used in project
- tsconfig.json :- The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project. The tsconfig.json file specifies the root files and the compiler options required to compile the project
- system.config.js :- Hold all the configuration for the project startup, here we write entry point/file for our project.
3 Comments
sujay kodamala
Should I add all those Json files mentioned in QuickStart ?
Pardeep Jain
Yes you should have to import all those json file to make project run, there are diff diff functionality for every json file. wait for a moment ill update my answer with some description related to these files.
sujay kodamala
Hey @Pradeep Jain , I see that systemjs.config.json should be included to get started with the project. But I'm trying to install systemjs using npm. It's not working.it's throwing error. Is there any potential fix for this !
Add angular2 via NPM package manager and typescript files should already be available in the right click add menu
2 Comments
Joseph Woodward
I wouldn't recommend adding it as a NuGet package. They're not updated at the same speed as the library. NPM is a better alternative.
Paul Swetz
Your probably right, I'm not totally fluent in all these fancy new package managers yet. Updated answer