Giter VIP home page Giter VIP logo

angular-tutorial-heroes-visualstudio's Introduction

Angular-Tutorial-Heroes-VisualStudio

Angular Tutorial Heroes Using Visual Studio

-Install Node.js® and npm if they are not already on your machine.

Verify that you are running node version 4.4.x - 5.x.x, and npm 3.x.x by running node -v and npm -v in a terminal/console window. Older versions produce errors.

-Set up Visual Studio for TypeScript

Ensure you have the latest version of Visual Studio 2015 installed. Then open Visual Studio and install the latest set of TypeScript tools as follows:

Open Tools | Extensions and Updates. Select Online in the tree on the left. Search for TypeScript using the search box in the upper right. Select the most current available TypeScript version. Download and install the package.

-Create the Visual Studio ASP.NET project

-Copy the QuickStart files into the ASP.NET project folder

-Restore the required packages

Right-click on the package.json file in Solution Explorer and select Restore Packages. This uses npm to install all of the packages defined in the package.json file. It may take some time. If desired, open the Output window (View | Output) to watch the npm commands execute. Ignore the warnings. When the restore is finished, a message should say: npm command completed with exit code 0. Click the Refresh icon in Solution Explorer. Do not include the node_modules folder in the project. Let it be a hidden project project folder.

An error such as "@angular/compiler is not in the npm registry" suggests that Visual Studio 2015 is using an older version of npm. Update to the latest installed version of npm:

Tools | Options to open the Options dialog. In the tree on the left, select Projects and Solutions | External Web Tools. On the right, move the $(PATH) entry above the $(DevEnvDir) entries. This tells Visual Studio to use the external tools (such as npm) found in your path before using its own version of the external tools. Click OK to close the dialog. Restart Visual Studio for this change to take effect.

-Edit the TypeScript configuration file

For Visual Studio 2015 we must add "compileOnSave": true to the TypeScript

-Build and run the app

Compiler errors such as "Property ‘map’ does not exist on type ‘Observable’" and "Observable cannot be found" indicate an old release of Visual Studio.

angular-tutorial-heroes-visualstudio's People

Contributors

kumudug avatar

Watchers

James Cloos avatar  avatar

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.