1

I have a .Net web app running .Net Framework 4.6.1 with Razor and AngularJS 1.7.5 and we wish to migrate to Angular 8.

  • Routing is being done in .Net.
  • The HTML contains both Razor and AngularJS logic to render the UI.

Sample Razor/Angular HTML:

<div id="container" ng-controller="MyController">
     @Html.Action("MyView", "Home")
</div>

Sample AngularJS logic Code:

angular.module('myApp').controller('MyController', ['$scope', function($scope) {
        $scope.doSomething= function () {
             //do stuff
        }            
    }
]); 
  1. We wish to do a hybrid migration. Is this possible?
  2. Would it be easier to rewrite the app from scratch?
  3. What are our options?

EDIT: This question is unique because it involves migrating a server-side rendered AngularJS .Net Application - Not client-side to Angular 8. I have heard of Angular Univeral which does just that but I want to know other options and if a hybrid approach is a possibility.

Rachel
  • 11
  • 3
  • This question is unique because it involves migrating a server-side rendered AngularJS .Net Application - Not client-side to Angular 8. I have heard of Angular Univeral which does (but uses Node.js) just that but I want to know other options and if a hybrid approach is a possibility. – Rachel Oct 11 '19 at 20:01

1 Answers1

-1

Angular 2 or above is not an upgrade of Angular 1 because it is completely rewritten, it's a new framework.

So the second question I think would be the right choice. ("Would it be easier to rewrite the app from scratch?)

Regards

Charly Sosa
  • 565
  • 3
  • 5
  • That is a matter of opinion. One of the keys to a successful upgrade is to do it incrementally, by running the two frameworks side by side in the same application, and porting AngularJS components to Angular one by one. – georgeawg Oct 11 '19 at 18:57
  • @georgeawg is a side by side upgrade a possibility in this scenario? I was unsure because Angular is client-side rendering and the current setup uses .Net Razor Pages to render server-side. – Rachel Oct 11 '19 at 19:54