-
-
Save pKrav75/2c563a67fd3b0ee91aee8178d42f48c8 to your computer and use it in GitHub Desktop.
Test composition
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> | |
<require from="myelem"></require> | |
<require from="base-element"></require> | |
<div>Hello</div> | |
<!-- aValue is a bindable property of the base-element which is included in myElem --> | |
<myelem aValue="topLevel"></myelem> | |
<hr> | |
</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 { | |
} |
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> | |
<div view-spy compile-spy>${avalue}</div> | |
</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
import { bindable } from 'aurelia-framework'; | |
export class baseElement{ | |
@bindable avalue = "initial"; | |
created(owningView: View, myView: View){ | |
console.log('0 ' + owningView); | |
} | |
bind(bindingContext: Object, overrideContext: Object){ | |
console.log('1 ' + JSON.stringify(bindingContext)); | |
console.log('2 ' + JSON.stringify(overrideContext)); | |
} | |
} |
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> | |
<link rel="stylesheet" href="styles.css"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/jspm_packages/system.js"></script> | |
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/config.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
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 function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging(); | |
aurelia.start().then(a => a.setRoot()); | |
} |
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> | |
<require from="base-element"></require> | |
<base-element></base-element> | |
<div>${aname}</div> | |
</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
import { bindable } from 'aurelia-framework'; | |
export class myelem { | |
@bindable aname = "aName"; | |
bind(bindingContext: Object, overrideContext: Object){ | |
console.log('3 ' + JSON.stringify(bindingContext)); | |
console.log('4 ' + JSON.stringify(overrideContext)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment