![]() ![]() For example, JavaScript bundles include source maps (so that when debugging, you can see your original TypeScript code). In development, the app runs in a mode optimized for developer convenience. To install third-party npm packages, use a command prompt in the ClientApp subdirectory. For example, you can run npm run ng lint or npm run ng test. If you don't have the ng tool installed, run npm run ng instead. Internally, it uses ng serve in development. There's no need to run ng serve though, because your ASP.NET Core app deals with serving both server-side and client-side parts of your app. For example, you can run ng lint, ng test, or any of the other Angular CLI commands. If you have the ng tool installed globally, you can run any of its commands. In a command prompt, switch to the ClientApp subdirectory: cd ClientApp The app created by the template contains a Bootstrap-based layout and a basic routing example. There are slight differences between the Angular app created by this template and the one created by Angular CLI itself (via ng new) however, the app's capabilities are unchanged. See the official Angular documentation for more information. The ClientApp directory contains a standard Angular CLI app. The Angular app, residing in the ClientApp subdirectory, is intended to be used for all UI concerns. ![]() The ASP.NET Core app is intended to be used for data access, authorization, and other server-side concerns. The project template creates an ASP.NET Core app and an Angular app. On the first run, the build process restores npm dependencies, which can take several minutes. Run dotnet build to verify the app builds correctly. ![]() On Linux or macOS, run export ASPNETCORE_ENVIRONMENT=Development. ![]() On Windows (in non-PowerShell prompts), run SET ASPNETCORE_ENVIRONMENT=Development. Subsequent builds are much faster.Įnsure you have an environment variable called ASPNETCORE_ENVIRONMENT with a value of Development. The build process restores npm dependencies on the first run, which can take several minutes. csproj file, and run the app as normal from there. ![]()
0 Comments
Leave a Reply. |