Last active
July 12, 2017 01:12
-
-
Save AshleyGrant/76892007e274b737ebff9f170c91c238 to your computer and use it in GitHub Desktop.
Aurelia Gist
This file contains hidden or 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
| <template> | |
| <div repeat.for="section of sections" ref="$root" index.bind="$index"> | |
| ${section.name}, $index = ${$index} | |
| <div repeat.for="row of section.rows"> | |
| ${row.name} | |
| <div repeat.for="component of row.components"> | |
| ${component} $root.$index = ${$root.index} | |
| </div> | |
| </div> | |
| </div> | |
| </template> |
This file contains hidden or 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
| export class App { | |
| sections = [{ | |
| name: 'Section 1', | |
| rows: [{ | |
| name: 'row 1:1', | |
| components: [ 'component 1:1:1', 'component 1:1:2'] | |
| } | |
| ,{ | |
| name: 'row 1:2', | |
| components: [ 'component 1:2:1', 'component 1:2:2'] | |
| }] | |
| },{ | |
| name: 'Section 2', | |
| rows: [{ | |
| name: 'row 2:1', | |
| components: [ 'component 2:1:1', 'component 2:1:2'] | |
| } | |
| ,{ | |
| name: 'row 2:2', | |
| components: [ 'component 2:2:1', 'component 2:2:2'] | |
| }] | |
| }] | |
| } |
This file contains hidden or 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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Aurelia</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| </head> | |
| <body aurelia-app> | |
| <h1>Loading...</h1> | |
| <script src="https://jdanyow.github.io/rjs-bundle/node_modules/requirejs/require.js"></script> | |
| <script src="https://jdanyow.github.io/rjs-bundle/config.js"></script> | |
| <script src="https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js"></script> | |
| <script src="https://jdanyow.github.io/rjs-bundle/bundles/babel.js"></script> | |
| <script> | |
| require(['aurelia-bootstrapper']); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment