Skip to content

Instantly share code, notes, and snippets.

@jordanmaslyn
Forked from zewa666/app.html
Last active August 14, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanmaslyn/d7171f9290bb9d777399b0b65ab345b9 to your computer and use it in GitHub Desktop.
Save jordanmaslyn/d7171f9290bb9d777399b0b65ab345b9 to your computer and use it in GitHub Desktop.
Aurelia Store gist
<template>
<h1>Frameworks</h1>
<ul>
<li repeat.for="framework of state.frameworks">${framework}</li>
</ul>
</template>
// app.js
import { inject } from "aurelia-dependency-injection";
import { connectTo } from "aurelia-store";
@connectTo()
export class App {
state;
}
<!doctype html>
<html>
<head>
<title>Aurelia Store gist</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app="main">
<h1>Loading....</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script>
<script src="https://rawgit.com/zewa666/aurelia-kendoui-bundles/1.9.3/config2.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
/*******************************************************************************
* The following two lines enable async/await without using babel's
* "runtime" transformer. Uncomment the lines if you intend to use async/await.
*
* More info here: https://github.com/jdanyow/aurelia-plunker/issues/2
*/
//import regeneratorRuntime from 'babel-runtime/regenerator';
//window.regeneratorRuntime = regeneratorRuntime;
/******************************************************************************/
import { initialState } from "./state";
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin("aurelia-store", { initialState });
aurelia.start().then(a => a.setRoot());
}
export const initialState = {
frameworks: ["Aurelia", "React", "Angular"]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment