0

How can I open angular2 and TypeScript project in visual studio without npm/nodejs. I need to open the project in computer without network.

thank you

3
  • All you need is the Node_modules folder and you can run an angular 2 application Commented Nov 3, 2016 at 16:01
  • @Bean0341, How can I compile the typescript to js files? Commented Nov 3, 2016 at 19:25
  • aww yes I understand the question now, you have to have something to manage the typescript conversion.... I am of no use here :p However I have also heard of gulp but if you are going to use gulp then you might as well just use npm.... Commented Nov 3, 2016 at 20:32

1 Answer 1

0

In VS create new project -> TypeScript -> HTML Application with TypeScript. You will have Typescript transpiler set by default. Now you need angular 2. According to this answer you need to add these scripts to your page:

<script src="https://code.angularjs.org/2.0.0-beta.2/angular2-polyfills.js"></script>
<script src="https://code.angularjs.org/tools/system.js"></script>
<script src="https://code.angularjs.org/tools/typescript.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.2/Rx.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.2/angular2.dev.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.2/http.dev.js">

You also have to configure SystemJS as shown in the example i provided earlier.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.