Reputation: 2599
I have an MVC project in an Area of a larger solution. I would like to add an Angular App inside that area and add it to my MVC project. This is not a .Net Core Mvc project. How would i tell my project to use webpackdevmiddleware? I.E.
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions{
HotModuleReplacement = true
});
Since i would be adding the Mvc app in an area and my folder structure looks like so.
Where should i run my ng new command? IE C:\Project\Areas\Mvc ng new AngularApp or how do i set the directory so that the app is created in my MVC folder?
would it be easier to just create an angular .net core app instead? Inside the areas folder?
Upvotes: 2
Views: 5201
Reputation: 2599
If anyone is trying to figure out how to do this i found a guide that works HERE.
This particular example uses a gulp task to pull in the necessary node_modules and transpile your app into javascript. I am on the lookout at the moment for an example that does the same thing using webpack. Essentially you add a tsconfig.json, a package.json, a gulpfile.js, and then a tsconfig.js as well as your app files in typescript. This does not use the angular cli at all.
Upvotes: 4