Skip to content

Instantly share code, notes, and snippets.

@ZoolWay
Last active January 27, 2017 12:02
Show Gist options
  • Save ZoolWay/dc837978a514011e13c872dbad92ae3f to your computer and use it in GitHub Desktop.
Save ZoolWay/dc837978a514011e13c872dbad92ae3f to your computer and use it in GitHub Desktop.
External Component for Aurelia Plugin Loader III
<template>
<p style="border: 1px solid purple; padding: 1rem;">Comp3: ${myVar}</p>
</template>
import { useView } from 'aurelia-framework';
console.debug('Comp3 module loaded');
@useView('./comp3.html!gate')
export class Comp3 {
myVar = 'Hello from Comp3, my number is: ' + Math.floor((Math.random() * 100) + 1);
}
body {
font-size: 14pt
font-color: blue;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" type="text/css" href="ext-styles.css">
</head>
<body>
<p>This gist exists so that <a href="https://gist.run/?id=39e6fdacefc9e5c69b42a5e8c9049384" target="_blank">https://gist.run/?id=39e6fdacefc9e5c69b42a5e8c9049384</a> can run its comp3 as external component</p>
<script src="./script.js"></script>
</body>
</html>
console.info('Hello World!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment