Last active
June 28, 2017 10:24
-
-
Save Vheissu/1fb91f52f659cecfb74cb61e58afbeeb to your computer and use it in GitHub Desktop.
Example of a simple string loop in Aurelia
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
<template> | |
<ul> | |
<li repeat.for="name of names">${name}</li> | |
</ul> | |
<ol> | |
<li repeat.for="name of nameObjects">${name.name} has made ${name.commits} commits.</li> | |
</ol> | |
</template> |
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
export class App { | |
constructor() { | |
this.names = ['Rob', 'Jeremy', 'Ashley', 'Dwayne']; | |
this.nameObjects = [ | |
{name: 'Rob', commits: 100}, | |
{name: 'Jeremy', commits: 74}, | |
{name: 'Ashley', commits: 23}, | |
{name: 'Dwayne', commits: 4} | |
]; | |
} | |
} |
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
<!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