Skip to content

Expose parameter for label from named view #180

@jeserkin

Description

@jeserkin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions