I currently have an Angular controller that was generated using TypeScript:
class FileManagerController {
...
constructor($scope) {
$scope.vm = this;
...
}
...functions...
}
Can you guide me on how to integrate this controller into a directive?
var myApp = angular.module('myApp', ])
.directive('ngFilemanager', function () {
return {
restrict: 'EA',
require: '^ngModel',
scope: {
ngModel: '='
},
templateUrl: '/templates/filemanager.html',
controller: ???
}
});