Skip to content

Commit

Permalink
Updated examples
Browse files Browse the repository at this point in the history
added new {} reserved syntax to examples
  • Loading branch information
moappi committed Oct 29, 2021
1 parent acbb8bb commit 479ead3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1>Components Example</h1>

//List all the access as an inline list
// use the access for each employee
{"<>":"li","obj":function(){
{"<>":"li","{}":function(){
return(this.access);
},"text":"${value}"}
]}
Expand Down Expand Up @@ -103,7 +103,7 @@ <h1>Components Example</h1>
//Render the employees payments using the employee/payment component
// note that we need to pass the payment array directly to this component so it can render each payment
// the data property MUST be a function with the return value being the data used to render this component
{"[]":"employee/payment","obj":function(){
{"[]":"employee/payment","{}":function(){
return(this.payments);
}}
]}
Expand Down
2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>

<h1>json2html Examples</h1>
<p>Note that each example builds on it's self, it's recommended that you start from the top and work your way through each</p>
<p>Note that each example builds on its self, it's recommended that you start from the top and work your way through each</p>

<ul></ul>
</body>
Expand Down
6 changes: 3 additions & 3 deletions examples/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
//Render the employees payments using the employee/payment component
// note that we need to pass the payment array directly to this component so it can render each payment
// the obj property MUST be a function with the return value being the data object used to render this component
{"[]":"employee/payment","obj":function(){
{"[]":"employee/payment","{}":function(){
return(this.payments);
}}
]}
Expand All @@ -115,7 +115,7 @@

//List all the access as an inline list
// use the access for each employee
{"<>":"li","obj":function(){
{"<>":"li","{}":function(){
return(this.access);
},"text":"${value}"}
]}
Expand All @@ -142,7 +142,7 @@
//List all employees
// we do this by specifying that we want to render the 'employees' object
// with the employee component
{"[]":"employee","obj":function(){
{"[]":"employee","{}":function(){
return(this.employees);
}}
]}
Expand Down

0 comments on commit 479ead3

Please sign in to comment.