Skip to content

Instantly share code, notes, and snippets.

@sjarvela
Last active December 19, 2021 12:23
Show Gist options
  • Save sjarvela/d93c8c3e37cdfb7a40e25a1b115faded to your computer and use it in GitHub Desktop.
Save sjarvela/d93c8c3e37cdfb7a40e25a1b115faded to your computer and use it in GitHub Desktop.
aurelia2-dialog
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dumber Gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<base href="/">
</head>
<!--
Dumber Gist uses dumber bundler, the default bundle file
is /dist/entry-bundle.js.
The starting module is pointed to "main" (data-main attribute on script)
which is your src/main.js.
-->
<body>
<my-app></my-app>
<script src="/dist/entry-bundle.js" data-main="main"></script>
</body>
</html>
{
"dependencies": {
"aurelia": "latest"
}
}
<div style="color: red; border: 1px solid red">This is custom element A</div>
export class CustomElementA {
}
import Aurelia from 'aurelia';
import { DialogDefaultConfiguration } from '@aurelia/runtime-html';
import { MyApp } from './my-app';
Aurelia.register(DialogDefaultConfiguration).app(MyApp).start();
<h1>Dialog</h1>
<button>Open dialog</button>
import {
DialogService,
DialogDeactivationStatuses,
} from "@aurelia/runtime-html";
@inject(DialogService)
export class MyApp {
ds;
constructor(ds) {
this.ds = ds;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment