Abillity for href to open/render another view/template
See original GitHub issueSomething like that:
"templates": {
"body": {
"sections": [
{
"items": {
"{{#each $jason}}": {
"type": "label",
"text": "{{article.title}}",
"href": {
"param-to-pass-data": "{{article}}",
"template": "article",
"view": "jason"
}
}
}
},
]
},
"article": {...}
It would display another view in a push transition. Data can be passed.
My use case behind: I have everything I need in the first $network.request (a json with a list of articles, with their body). So I don’t need extra http call, etc.
First talk was on slack. Need discussion.
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
No results found
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
That is perfect then!
I thought it rendered a something like
That’s a great solution then. I like how we handled raw html display as well with this.
The way the template engine works is:
So for example, let’s say
article
looked like:Then when we run it through
It becomes:
However, if you try to parse the same data with something like this:
Then, since you can’t create an object out of this, it stringifies it like:
Here’s more example from the test file:
p.s. I’m actually trying to open source this template engine as well. It is already included in the project and you can read the source if you want, but it’s all minified so it’s not really practical at the moment.