I am currently in the process of transitioning an App from JavaScript\Ionic\Angular1 to Typescript\Ionic2\Angular2 one file at a time. I have extensively researched various guides on migrating between these technologies, completed the Angular 2 quick start and tutorial, and familiarized myself with converting from .js to .ts. Additionally, I have installed all necessary npm packages required for the migration. Now that I have everything set up, I am seeking assistance on how to initiate the actual migration process. With numerous files awaiting conversion, it would be immensely helpful to have just one file successfully converted, with the old code commented out, as a reference to aid in converting the rest.
Below is an example file. If you could assist me with converting this file or provide guidance on how to convert it, I would greatly appreciate it.
angular.module('myApp.app', ['ionic'])
.controller('myApp.app', function($rootScope, $scope, AService, BService, CService){
$scope.setUserName = function (user){
$scope.user = user;
};
document.addEventListener('deviceready', function() {
$rootScope.$on('$cordovaNetwork:online', function (e, nState) {
BService.setOnline(true);
})
})
})
Thank you.