This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Description
If the router supported 'component-based' directives (including the directive's template) then it would give a nice path for migrating controllers/components to angular 2.0.
Any thoughts on achieving something like below?:
angular.module('app', ['ngNewRouter'])
.directive('componentDirective', function() {
return {
templateUrl : 'componentDirective.html',
controllerAs : 'ctrl',
controller : function() {
// Controller here
}
}
});
.controller('AppController', function($router) {
$router.config([
{path: '/', component: 'componentDirective' }
);
});