Ezi
Ezi

Reputation: 2210

Use razor views with Angular2

In ASP.NET core 1 (asp.net 6) visual studio has the option to scaffold views automatically based on my data-modal classes, it knows exactly which type of editor to display based on the data type which is great.

Now I want to change the application to be SPA using angular2, is there a way for me to actually use those views, or I have to rewrite them all?.

I read an article on angular1 saying that this could be done by importing a few script libraries to the _layout file. but I can't find anything similar for angular2.

Upvotes: 1

Views: 3857

Answers (1)

Ezi
Ezi

Reputation: 2210

After lots of searching I came to the conlution that using those views won't work, but the good news is that there's a visual studio add-on that generates typecript files based on the modal!

It could be downloaded free from Here

EDIT: I was wrong, in fact it is possible to use razor views together with angular 2. see that blog post for an example.

Upvotes: 2

Related Questions