-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Milestone
Description
Angular is fully heading to a component-driven architecture. The Angular 1.4 and 2.0 router (same router) will allow routing to components (aka directives with a template and controller). This was actually a great idea from the core team! It makes a lot of sense. I think ui-router would benefit from being able to route to a 'component' as well. With the new angular.component proposal it will be easier for the average developer to make components.
E.g.
$stateProvider.state('home', {
url: '/',
component: 'home'
})
angular.directive('home', function(){
return {
template: `<h1>Home Sweet Home</h1>
<ui-view></ui-view>`,
controller: function($state) {
}
}
})
Just an idea...