Skip to content

Instantly share code, notes, and snippets.

@opcodewriter
Last active April 12, 2016 16:01
Show Gist options
  • Save opcodewriter/12b214cd51ce0e34af27cead944b94d2 to your computer and use it in GitHub Desktop.
Save opcodewriter/12b214cd51ce0e34af27cead944b94d2 to your computer and use it in GitHub Desktop.
Aurelia If Bind test on <content>
<template>
<require from="./parent"></require>
<parent></parent>
</template>
export class App {
}
<template>
<button>button from child</button>
</template>
import {bindable, inject} from 'aurelia-framework';
import {Parent} from './parent'
@inject(Parent)
export class Child
{
@bindable parentVM;
constructor(parent) {
this.parent = parent;
}
}
<!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://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>
<template>
<require from="./child"></require>
<div>Hello</div>
<child></child>
</template>
export class Parent
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment