Created
September 19, 2019 10:26
-
-
Save g105b/7462e87619b10a56e031a7eca30aab89 to your computer and use it in GitHub Desktop.
Binding nested lists example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>More bind examples</p> | |
<p>Nested list example:</p> | |
<ul> | |
<li data-template> | |
<p data-bind:text>Make name</p> | |
<ul> | |
<li data-template data-bind:text>Model name</li> | |
</ul> | |
</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Page; | |
use Gt\WebEngine\Logic\Page; | |
class IndexPage extends Page { | |
public function go() { | |
$data = [ | |
"Fiat" => [ | |
"500", | |
"Bravo", | |
"punto", | |
], | |
"Toyota" => [ | |
"Corolla", | |
"Auris", | |
"Prius", | |
], | |
"VW" => [ | |
"Beetle", | |
"Polo", | |
"golf" | |
] | |
]; | |
$this->document->bindList($data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment