Angular CLI in ASP.NET Kernel with Hot Swap Module

We want to use the Angular CLI for our projects in the ASP.NET core. As the output, we select wwwroot instead of dist. By default, ng is used to automatically replace a hot module. But now we need to have the hot module replaced with the help of the Kestell and iis integration. We decided not to use the basic AspNet Javascripts servers, because we want to use the Angular CLI by default.

Does anyone know how to enable hot swapping of a module using Angular CLI and the main ASP.NET host with static files inside wwwroot?

+4
source share
2 answers

I can run angular cli with these steps.

  • , ​​ typescript.

  • asp.net core angular Visual Studio 2017.

  • npm npm-check-updates

  • npm

    npm install

  • angular/cli

    npm install @angular/cli@latest -g

  • angular/cli local

    npm install @angular/cli@latest --save-dev

  • angular :

    ng new hello-world

  • .angular-cli.json . :

    "root" : "src" "root" : "ClientApp"

!

:

cd ClientApp/app/components

:

ng g c MyComponent --module='app.module.browser.ts'

0

, , -. Ng webpack dev (angular app) iis express with kestrel -api MVC... , ng-.

0

Source: https://habr.com/ru/post/1687805/


All Articles