GithubHelp home page GithubHelp logo

angular2-getting-started-in-vs's Introduction

Getting Started in Visual Studio

Angular 2 documentation includes a "Getting Started" chapter in TypeScript

The instructions are good but not aimed at the Visual Studio 2015 developer.

Here is a repo that ports the sample (with extra 2-way binding!) to the Visual Studio 2015 world.

Confession: I took an existing Getting Started project and jammed it into VS which isn't the best way to proceed.

Steps

  1. CREATE a Visual Studio solution name "angular2-getting-started"

  2. DELETE the generated index.html, and app stuff.

  3. IGNORE the src level in the instructions; just put everything in the project root

    • node_modules
    • typings
    • index.html
    • package.json
    • tsconfig.json (more on that in a moment)
  4. DO install the npm packages from the command line.

    DO NOT include node_modules in your project or you will be very sorry.

  5. COPY node_modules/traceur/bin/traceur-runtime.js to another location.

    IIS refuses to serve anything from a directory named bin which means you'll get a 404 later if you try to reference this. I put my copy in node_modules/traceur/traceur-runtime.js.

  6. UPDATE the traceur script source in index.html to match the copy location.

  7. EXPECT VS to ignore tsconfig.json. It uses settings in the .csproj

  8. OPEN the properties of the project (Alt Enter) a. pick "Module System | commonJS" b. check "Generate source maps" c. check (leave checked) "Compile on save". This is nice!

  9. EDIT the .csproj file in a text editor !!!

    Two critical settings are not exposed in Visual Studio. Add them by hand next to the similarly named settings.

    <TypeScriptEmitDecoratorMetadata>True</TypeScriptEmitDecoratorMetadata>
    <TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
    
  10. RUN it (without debugging) by pressing Ctrl-F5

angular2-getting-started-in-vs's People

Contributors

wardbell avatar

Watchers

 avatar

Forkers

erezbarak

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.