toddmotto / angularjs-styleguide

AngularJS styleguide for teams
https://ultimateangular.com
5.96k stars 700 forks source link

routed component #79

Closed lionelB closed 8 years ago

lionelB commented 8 years ago

Hello todd,

thanks for this new version of your styleguide. You mention in routed component that we can use a component prop when declaring a state but I can't find any documentation in ui-router about it

    $stateProvider
      .state('todos', {
        url: '/todos',
        component: 'todo',
        resolve: {
          todoData: TodoService => TodoService.getTodos();
        }
      });
  })

I like the idea a lot can you have any infos on that ?

qlonik commented 8 years ago

Hello. This feature is available in ui-router v1-alpha. It is not present in the current version of ui-router.

floriangosse commented 8 years ago

Checkout the issue angular-ui/ui-router#2547. There is a polyfill for it: ui-router-route-to-components.

floriangosse commented 8 years ago

Hi @lionelB, do you have any further questions?

lionelB commented 8 years ago

It' s ok thanks.

toddmotto commented 8 years ago

And now in 1.0.0-beta ui-router :)