Skip to content

Instantly share code, notes, and snippets.

@jholland918
Last active May 2, 2018 19:02
Show Gist options
  • Save jholland918/9afdc1f37279c030745e7afb830ff7a8 to your computer and use it in GitHub Desktop.
Save jholland918/9afdc1f37279c030745e7afb830ff7a8 to your computer and use it in GitHub Desktop.
Aurelia TypeScript Template for Plunker
<template>
<h1>${message}</h1>
</template>
export class App {
message = 'Hello World';
}
<!DOCTYPE html>
<html>
<head>
<title>Aurelia TypeScript Template</title>
</head>
<body aurelia-app="main">
<h1>Loading...</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.20.19/system.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
export function configure(aurelia) {
aurelia.use.basicConfiguration();
aurelia.start().then(() => aurelia.setRoot());
}
System.config({
map: {
'i18next': 'https://unpkg.com/i18next/i18next.min',
'aurelia-binding': 'https://unpkg.com/aurelia-binding/dist/commonjs/aurelia-binding.js',
'aurelia-bootstrapper': 'https://unpkg.com/aurelia-bootstrapper/dist/commonjs/aurelia-bootstrapper.js',
'aurelia-dependency-injection': 'https://unpkg.com/aurelia-dependency-injection/dist/commonjs/aurelia-dependency-injection.js',
'aurelia-dialog': 'https://unpkg.com/aurelia-dialog/dist/commonjs',
'aurelia-event-aggregator': 'https://unpkg.com/aurelia-event-aggregator/dist/commonjs/aurelia-event-aggregator.js',
'aurelia-fetch-client': 'https://unpkg.com/aurelia-fetch-client/dist/commonjs/aurelia-fetch-client.js',
'aurelia-framework': 'https://unpkg.com/aurelia-framework/dist/commonjs/aurelia-framework.js',
'aurelia-history': 'https://unpkg.com/aurelia-history/dist/commonjs/aurelia-history.js',
'aurelia-history-browser': 'https://unpkg.com/aurelia-history-browser/dist/commonjs/aurelia-history-browser.js',
'aurelia-i18n': 'https://unpkg.com/aurelia-i18n/dist/commonjs',
'aurelia-loader': 'https://unpkg.com/aurelia-loader/dist/commonjs/aurelia-loader.js',
'aurelia-loader-default': 'https://unpkg.com/aurelia-loader-default/dist/commonjs/aurelia-loader-default.js',
'aurelia-logging': 'https://unpkg.com/aurelia-logging/dist/commonjs/aurelia-logging.js',
'aurelia-logging-console': 'https://unpkg.com/aurelia-logging-console/dist/commonjs/aurelia-logging-console.js',
'aurelia-metadata': 'https://unpkg.com/aurelia-metadata/dist/commonjs/aurelia-metadata.js',
'aurelia-pal': 'https://unpkg.com/aurelia-pal/dist/commonjs/aurelia-pal.js',
'aurelia-pal-browser': 'https://unpkg.com/aurelia-pal-browser/dist/commonjs/aurelia-pal-browser.js',
'aurelia-path': 'https://unpkg.com/aurelia-path/dist/commonjs/aurelia-path.js',
'aurelia-polyfills': 'https://unpkg.com/aurelia-polyfills/dist/commonjs/aurelia-polyfills.js',
'aurelia-router': 'https://unpkg.com/aurelia-router/dist/commonjs/aurelia-router.js',
'aurelia-route-recognizer': 'https://unpkg.com/aurelia-route-recognizer/dist/commonjs/aurelia-route-recognizer.js',
'aurelia-task-queue': 'https://unpkg.com/aurelia-task-queue/dist/commonjs/aurelia-task-queue.js',
'aurelia-templating': 'https://unpkg.com/aurelia-templating/dist/commonjs/aurelia-templating.js',
'aurelia-templating-binding': 'https://unpkg.com/aurelia-templating-binding/dist/commonjs/aurelia-templating-binding.js',
'aurelia-templating-resources': 'https://unpkg.com/aurelia-templating-resources/dist/commonjs',
'aurelia-templating-router': 'https://unpkg.com/aurelia-templating-router/dist/commonjs',
'aurelia-validation': 'https://unpkg.com/aurelia-validation/dist/commonjs',
},
packages: {
'.': {},
'aurelia-templating-resources': {
main: 'aurelia-templating-resources.js'
},
'aurelia-templating-router': {
main: 'aurelia-templating-router.js'
},
'aurelia-validation': {
main: 'aurelia-validation.js'
},
'aurelia-dialog': {
main: 'aurelia-dialog.js'
},
'aurelia-i18n': {
main: 'aurelia-i18n.js'
},
}
});
{
"compilerOptions": {
"target": "ESNEXT",
"module": "commonjs",
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
@raymak23
Copy link

raymak23 commented May 2, 2018

Do you have an example that runs in plunker with aurelia routing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment