This project was generated with angular-cli. To learn more about Angular2 or the angular cli please reference the docs.
This project was scaffolded using Yoeman using the aspnetcore-angular2 generator
Requirements
- .NET Core SDK
- NodeJs
- Yarn (Optional)
Recommended tools
- Angular-cli: install globally using
npm install -g angular-cli
-
Visual Studio 2015 Requirements
-
VSCode
Recommended Extensions:-
Language Support
-
Snippets and Autocomplete
-
Linters
-
Package Management
-
Utilities
-
- Visual Studio 2015 will attempt to restore both nuget and npm packages automatically.
- If this fails or if Visual Studio is just being difficult you can manually trigger this.
- Nuget: via the nuget package manager
- Node modules: via the Task Runner Explorer via the "Install" task.
- If this fails or if Visual Studio is just being difficult you can manually trigger this.
- VSCode / CLI
- Open a command line interface
- Execute
dotnet restore
for nuget packages - Execute
npm install
for node modules- If you installed yarn execute
yarn
- If you installed yarn execute
- Visual Studio: Normal build procedure.
- There are bindings in the package.json file that instruct Visual Studio to trigger the cient build prior to buiding the C# code.
- VSCode / CLI
- Execute
npm run build
- There are script definitions in the package.json file that will trigger both .net and JS builds.
- Execute
- Visual Studio: Normal run / debug procedure.
- VSCode also has a nice integrated debugging experience.
- Click on the debug tab and click run at the top.
- Make sure ".Net Core Launch (web)" profile is selected.
- Click on the debug tab and click run at the top.
Angular 2 and it's CLI have some nice features to help speed up development.
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive/pipe/service/class
.
Run ng build
to build the project. The build artifacts will be stored in the wwwroot/
directory. Use the -prod
flag for a production build.
Run npm test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
Run ng github-pages:deploy
to deploy to Github Pages.
To get more help on the angular-cli
use ng --help
or go check out the Angular-CLI README.
Note: While running the server you can still make changes to the client without having to "rerun".
Simply execute ng build
to rebuild client code then refresh your browser to see the changes.
Build Agent Requirements