Ability to display argument as content for component
See original GitHub issueIs your feature request related to a problem? Please describe Lets say we have some component named: app-button. We want content (children) of this component to be displated eg. as label:
<app-button>Hello Button</app-button>
@Component({
selector: 'app-button',
template: '<ng-content></ng-content>'
})
export class AppButtonComponent {}
How can we pass prop which will correspond with ng-content and generate examples as given:
const Template: Story<ButtonArgs> = (args, context) => {
return {
props: {
content: 'My Button' // how to pass property which will display dynamically as ng-content
}
}
}
Describe the solution you’d like I would like to have ability to pass content which will be used as ng-content in my component.
Describe alternatives you’ve considered
I know I can create some property in ButtonComponent and use it instead of ng-content, but this will not give me correct code syntax in Show code. I would like to see code:
<app-button>My Button</app-button>
Additional info Maybe there exist option to do what i described, but i haven’t found it in documentation.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:18 (14 by maintainers)
Top Results From Across the Web
reactjs - Is it possible to pass a React Component as argument ...
Try Component instead of component . React requires an upperCase for jsx tag: renderCards(Component){ let cards = this.props.list.map(function(cardData){ ...
Read more >2. Components - Embedding Perl in HTML with Mason [Book]
Components can receive arguments as the result of external requests, such as those via HTTP, or they can receive arguments when they are...
Read more >Argument: The Basics | Department of Communication
There are five highly relevant characteristics of argument: Argumentation is a ... Character means displaying traits your audience admires—like honesty, ...
Read more >Adding arguments and options to your Bash scripts - Red Hat
The ability to use positional parameters—otherwise known as arguments—to specify data to be used as values for variables in the scripts is one ......
Read more >Argument Writing Components - YouTube
Joan Sedita reviews the components of writing an argument piece. This is an excerpt from Keys to Content Writing Professional Development.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ThibaudAV & @kroeder what do you think about innerTemplate?
@manuelmeister I’m not knowledgable about Angular. @ThibaudAV @kroeder can hopefully give feedback and help you make that happen!