Currently, I'm in the process of developing a straightforward couchapp utilizing AngularJS and TypeScript for my project. My inspiration comes from the AngularJS angular-phonecat tutorial, and I have successfully converted most of the application to idiomatic TypeScript based on the pwalat / Piotr.Productlist resources[1]. However, the challenge lies in creating the appropriate TypeScript equivalent for the Angular router's $routeProvider.
//app/js/app.js[2]
angular.module('phonecat', []).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/phones', {templateUrl: 'partials/phone-list.html', controller: PhoneListCtrl}).
when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}).
otherwise({redirectTo: '/phones'});
}]);
I understand that it needs to be wrapped inside a module {}
structure somehow?