How to use angular along with ASP.NET mvc project
-
How to use angular along with ASP.NET mvc project?
Aren't Angular and ASP.NET MVC mutually exclusive? I mean angular is totally different than asp.net mvc, here(asp.net) code executes on server and in another(angular) js code executes on client side. asp.net view and angular view are totally different
===================================================== The grass is always greener on the other side of the fence
-
How to use angular along with ASP.NET mvc project?
Aren't Angular and ASP.NET MVC mutually exclusive? I mean angular is totally different than asp.net mvc, here(asp.net) code executes on server and in another(angular) js code executes on client side. asp.net view and angular view are totally different
===================================================== The grass is always greener on the other side of the fence
There's an existing template in visual studio 2017 in .net core that use angular. I suggest you can see that project on how it works as a starting point.
Quote:
asp.net view and angular view are totally different
An overview, asp.net view runs on server side and will return html to browser then AngularJS will then inspect the generated html (from server/asp.net) and executes to render and set the behavior accordingly.
[Signature space for sale]
-
How to use angular along with ASP.NET mvc project?
Aren't Angular and ASP.NET MVC mutually exclusive? I mean angular is totally different than asp.net mvc, here(asp.net) code executes on server and in another(angular) js code executes on client side. asp.net view and angular view are totally different
===================================================== The grass is always greener on the other side of the fence
Nitin Sawant wrote:
I mean angular is totally different than asp.net mvc, here(asp.net) code executes on server and in another(angular) js code executes on client side. asp.net view and angular view are totally different
True.
Nitin Sawant wrote:
How to use angular along with ASP.NET mvc project?
Angular is somewhat a client-side MVC. You can probably mix Angular and ASP.NET MVC but it's not ideal. You could however use ASP.NET Core / ASP.NET Web API with Angular to communicate with your data from the server and if you are really trying to build a SPA application.
-
Nitin Sawant wrote:
I mean angular is totally different than asp.net mvc, here(asp.net) code executes on server and in another(angular) js code executes on client side. asp.net view and angular view are totally different
True.
Nitin Sawant wrote:
How to use angular along with ASP.NET mvc project?
Angular is somewhat a client-side MVC. You can probably mix Angular and ASP.NET MVC but it's not ideal. You could however use ASP.NET Core / ASP.NET Web API with Angular to communicate with your data from the server and if you are really trying to build a SPA application.
You can probably mix Angular and ASP.NET MVC but its not ideal.
I wonder what is ideal to use with Angular I mean for authentication & db connectivity etc.
===================================================== The grass is always greener on the other side of the fence
-
You can probably mix Angular and ASP.NET MVC but its not ideal.
I wonder what is ideal to use with Angular I mean for authentication & db connectivity etc.
===================================================== The grass is always greener on the other side of the fence
Quote:
I wonder what is ideal to use with Angular I mean for authentication & db connectivity etc.
ASP.NET Core/ Web API as your back-end is the way to go.
-
How to use angular along with ASP.NET mvc project?
Aren't Angular and ASP.NET MVC mutually exclusive? I mean angular is totally different than asp.net mvc, here(asp.net) code executes on server and in another(angular) js code executes on client side. asp.net view and angular view are totally different
===================================================== The grass is always greener on the other side of the fence
I've been pondering the notion of mixing Angular with .Net MVC as well for about 3 weeks now. Noticed how I wrote Angular and not AngularJS? AngularJS was the first version, then they changed the name to just Angular. I just added Angular 5 to my .Net Core 2.1 project, and will write some Angular stuff next week. So I'm moving forward with it and decided to adopt it. Why? I questioned why so many software recruiters are looking for the Senior .Net Core 2 and Angular guy, and thought why? There both MVC except one is client and one is server. So I started searching the interwebs for the answer and this is what I found. Weather.com At first, I found weather.com, that uses Angular to display the weather for your city for that day. A single page app in which you can move to the next day, or a week, 10 day forecast, and the home page "Wall" of weather related topics. So I get it. TV Guide The I went to TV Guide, and saw similiar technology being used for TV Listings. You can hit next and get the listings for the next hour. Makes sense to me here as well. Navigation After that I realized that it could be used for menu's and navigation as well. Being able to take a Bootstrap dropdown menu and use Angular to populate departments, categories instead of the menu being static. Or create flyouts ads, and grab an ad using Angular and then animate it. My thoughts So MVC has the controller and Models, then you create a limited view, and finish it off with Angular. When I look at .Net Core 2.1, I can see how you can build a limited version of core with a couple View pages and serve up Angular or ReactJS pages instead. I'm looking at the Angular Demo now, and that would be too hard core for me to start with. I choose to use NPM and distribute it with Gulp and bundle it, and will try building another Angular page within a View. Summary Well that's as far as I have gotten on the subject. But once again it's another move towards shifting server CPU loads and bandwidth back to the client and use their CPU power and electricity to generate a page. Servers can just send Json formatted data. I'll find out in time if it's worth it or not, plus I have zero debate points to argue in favor of it.
If it ain't broke don't fix it Discover my world at jkirkerx.com
-
I've been pondering the notion of mixing Angular with .Net MVC as well for about 3 weeks now. Noticed how I wrote Angular and not AngularJS? AngularJS was the first version, then they changed the name to just Angular. I just added Angular 5 to my .Net Core 2.1 project, and will write some Angular stuff next week. So I'm moving forward with it and decided to adopt it. Why? I questioned why so many software recruiters are looking for the Senior .Net Core 2 and Angular guy, and thought why? There both MVC except one is client and one is server. So I started searching the interwebs for the answer and this is what I found. Weather.com At first, I found weather.com, that uses Angular to display the weather for your city for that day. A single page app in which you can move to the next day, or a week, 10 day forecast, and the home page "Wall" of weather related topics. So I get it. TV Guide The I went to TV Guide, and saw similiar technology being used for TV Listings. You can hit next and get the listings for the next hour. Makes sense to me here as well. Navigation After that I realized that it could be used for menu's and navigation as well. Being able to take a Bootstrap dropdown menu and use Angular to populate departments, categories instead of the menu being static. Or create flyouts ads, and grab an ad using Angular and then animate it. My thoughts So MVC has the controller and Models, then you create a limited view, and finish it off with Angular. When I look at .Net Core 2.1, I can see how you can build a limited version of core with a couple View pages and serve up Angular or ReactJS pages instead. I'm looking at the Angular Demo now, and that would be too hard core for me to start with. I choose to use NPM and distribute it with Gulp and bundle it, and will try building another Angular page within a View. Summary Well that's as far as I have gotten on the subject. But once again it's another move towards shifting server CPU loads and bandwidth back to the client and use their CPU power and electricity to generate a page. Servers can just send Json formatted data. I'll find out in time if it's worth it or not, plus I have zero debate points to argue in favor of it.
If it ain't broke don't fix it Discover my world at jkirkerx.com
jkirkerx wrote:
notion of mixing Angular with .Net MVC
You probably can mix Angular and ASP.NET MVC, but if you are aiming for SPA, I would suggest to just stick to Angular as your front-end and use ASP.NET Web API /ASP.NET Core Web API as your back-end. Keep in mind that ASP.NET MVC is also front-end but generates pages from the server.
-
jkirkerx wrote:
notion of mixing Angular with .Net MVC
You probably can mix Angular and ASP.NET MVC, but if you are aiming for SPA, I would suggest to just stick to Angular as your front-end and use ASP.NET Web API /ASP.NET Core Web API as your back-end. Keep in mind that ASP.NET MVC is also front-end but generates pages from the server.
I'll get to that next week to see what you mean, and if my project build is correct. But thanks for the heads up on that.
If it ain't broke don't fix it Discover my world at jkirkerx.com