Change $scope.data in ui router

47 Views Asked by At

How do you show different data (single views, not nested) in the same template in the same state using ui-router. Can you use resolve?

1

There are 1 best solutions below

0
On

You could treat it like you would a normal template and join them together like so:

    $stateProvider
      .state('auth', {
        url: '/sign-in',
        template: ['<fl-sign-in></fl-sign-in>',
                   '<fl-request-password-reset></fl-request-password-reset>'].join(''),
        data:{
          skipAuth: true
        }
      });

This joins both components together into the one view. Why do this though?