Hello
I'm trying to integrate asp.net core 2.0 with angular 4 project, i used this tutorial as a first step:
https://medium.com/@levifuller/building-an-angular-application-with-asp-net-core-in-visual-studio-2017-visualized-f4b163830eaa
i feel like there's something missing by following the tutorial even though the application runs succesfully, but there's some strange errors appears in the console from angular side.
now i wil explain how i create the project:
the project is made with VS2017, .Net Core2.0 i used to create an MVC template.
then i follow the tutorial to add angular 4.
By running ng build there's some scripts that has been generated, i include them in the _layout.cshtml file :
in the index.cshtml file in include angular tag:
it worked fine, BUT when i navigate to another .cshtml page an error apperes in the console:
The selector "app-root" did not match any elements
and if i include another tag for another angular component:
the error apperes again.
i don't know what's gone wrong.
Fares AyyadPosted Nov 25, 2017, 10:51 AM
Khaja MoizuddinPosted Nov 25, 2017, 1:08 AM