Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to setup Angular4 in Visual Studio 2017

Angular 4 is here and it’s the right time to learn one of the most popular and powerful JavaScript frameworks. Angular as you might already know is one of the most popular JavaScript frameworks already for creating web apps. Developed by Google, you can be assured that this powerhouse of a framework is built with speed and purpose.

Setting up Angular 4 in Visual Studio 2017 – step by step

Ensure you follow the below steps and code snippets to setup the Visual Studio environment to run Angular 4 application.

  1. Create an empty Asp.net Web application

  1. Download the Angular quick start from GitHub by visiting the below URL https://github.com/Angular/quickstart
  1. Make sure Node.js and Typescript latest version are installed in your machine.
  1. Extract the downloaded quick start project sample.
  1. From the downloaded quick start project copy and paste below files into your Visual Studio solution.
  • Copy Package.json, ts,  systemjs.config.js, tsconfig.json to project main folder
  • Create a folder called “app” where all our Angular stuffs will be placed.
  • Copy src/app/app.module.ts and src/app/app.component.ts file to your “app” folder.
  • Now Right click the package.json file from your solution and click “Restore Packages” to install all packages.
  • once installed successfully you will get the “node_modules” folder in your solution.
  1. Add Default.aspx file to the solution. In order to imitate the first component in Angular which is probably your app.component use the selector of this component in Default.aspx file as shown below,

  1. In systemjs.config.js file comment the meta section that is available under packages section as shown below,

  1. Add module id to all the component which you can add as shown below,

That’s it. Now you are ready to run the Angular 4 application in Visual Studio just by hitting the F5 button like running other applications in visual studio. Hope you find this article useful. If you are looking for any topics that we can cover or have a comment on this blog, you are welcome to let us know via the comments below.

The post How to setup Angular4 in Visual Studio 2017 appeared first on Hubfly.



This post first appeared on 7 MISCONCEPTIONS SMALL BUSINESS HAVE ABOUT INTRANET, please read the originial post: here

Share the post

How to setup Angular4 in Visual Studio 2017

×

Subscribe to 7 Misconceptions Small Business Have About Intranet

Get updates delivered right to your inbox!

Thank you for your subscription

×