简体   繁体   中英

Running an Angular6 project on VS2017

I have created an angular 6 project by first creating a "Console Node js App", and then importing the result of a "ng create ...".

The project builds fine, but i can't figure out how to run it, that is, how to run the command "ng serve" from a Ctrl-F5 on VS2017. Is that possible? Can I run a bat/exe along with the "Start Without Debugging (Ctrl-F5)"?

This is a little more complex then simply pressing F5. You can add pre and post build event command in the project properties (right click project -> properties -> build events).

While I have never done this you could build out a .BAT file as you suggested that runs all the commands and have it executed by changing the build events as shown above.

However, you're best keeping your frontend outside of Visual Studio and away from the solution. It gets messy fast. IMO.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM