question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

label function support

See original GitHub issue

It should work exactly the same way as parent

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
bautistaaacommented, Mar 26, 2015

this would be helpful, i have multiple controllers using the same state and in order to render their own custom breadcrumbs I have to attach the same function in each controller vs being able to pass in a provider or service

ncyBreadcrumb:{
    label:  function(myService, $stateParams) {
                  return myService.getLabel($stateParams.id);
              }
 }

if there way I can accomplish this?

1reaction
fgaritcommented, Mar 20, 2015

I would also see the use for having a function for label. function($scope, $state) Maybe the function could return a promise that would be waited on before displaying.

Basically, I’ve got states that have have a parent state with a dynamic label. And I would like for there to be a way to handle that.

Home > user name > current state

“user name” would be a state such as “site.user({id: 12})”, and I would like in the label function to be able to perform a backend query to get the name of the user and output it there.

While it’s true the backend query can be done in the current state and some scope var can be set to print the user name, I would prefer if the current state didn’t have to handle that. I would like each state to handle its own labeling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

label - JavaScript - MDN Web Docs
The labeled statement can be used with break or continue statements. It is prefixing a statement with an identifier which you can refer...
Read more >
label function - RDocumentation
Label (actually Label.data.frame ) is a function which generates S source code that makes the labels in all the variables in a data...
Read more >
Create and print labels - Microsoft Support
Learn how to make labels in Word. You can create and print a full page of address labels or nametags. Get started on...
Read more >
Labeling Controls | Web Accessibility Initiative (WAI) - W3C
Labels need to describe the purpose of the form control. This section of the tutorial describes how to provide labels that are properly...
Read more >
HTML label tag - W3Schools
HTML <label> Tag · Definition and Usage · Tips and Notes · Browser Support · Attributes · Global Attributes · Event Attributes ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found