Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose parameter for label from named view #180

Open
jeserkin opened this issue Jun 12, 2017 · 0 comments
Open

Expose parameter for label from named view #180

jeserkin opened this issue Jun 12, 2017 · 0 comments

Comments

@jeserkin
Copy link

jeserkin commented Jun 12, 2017

I am using angular-ui-router: '0.2.18' and latest version of angular-breadcrumb.

State label consists of a translation code, that is translated in custom template as suggested here #65 by plugin author.

Translation has got a variable inside, that I would like to replace. The issue is, that the state uses named view and does not have a direct controller for it, since template for named view already has one.

// state
{
  parent: 'app',
  abstract: true,
  url: '/some/url/{id:int}',
  views: {
    'content@': {
      template: '<some-component></some-component>'
    }
  },
  /*
  resolve: {
    someId: $stateParams => {
      return $stateParams.id;
    }
  }
  */
  ncyBreadcrumb: {
    label: 'some.code.for.translation'
  }
}

What are the options then to pass the variable inside this label translation?

PS
I did try the resolve option as well, but it did not replace {{$resolve.someId}} with value from url inside translation.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant