Skip to content

Instantly share code, notes, and snippets.

Sean Hunter freshcutdevelopment

Block or report user

Report or block freshcutdevelopment

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View aurelia-index.html
<!-- app/test.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<h1>test</h1>
View aurelia-status
export function getStatus(){
console.log('JSPM set up correctly!');
}
View aurelia-app.js
// app/app.js
import {getStatus} from 'status';
getStatus();
View test_v2.html
<!-- app/test.html -->
<!DOCTYPE html>
<html>
...
<body>
<h1>test</h1>
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
System.import('app');
View test_v2.html
<!-- app/test.html -->
<!DOCTYPE html>
<html>
...
<body>
<h1>test</h1>
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
System.import('app');
View aurelia-app_v2.js
// app/app.js
export class App{
constructor(){
this.status = "Aurelia has been Bootstrapped"+
"loading corresponding view for "+
"this view-model.. looking for app.html";
}
}
View aurelia-app.html
<!-- app/app.html -->
<template>
<h1>${status}</h1>
</template>
View test_v3.html
<!-- app/test.html -->
<!DOCTYPE html>
<html>
...
<body>
<h1>Status - Page</h1>
<div class="jumbotron">
<div aurelia-app>
</div>
</div>
View calculator_module.js
var calculator = (function () {
return {
add: function(x, y){
return x + y;
},
subtract: function(x,y){
return x - y;
}
};
View es6_calculator_module.js
//------ calculator.js ------
export function add(x) {
return x + y;
}
export function subtract(x, y) {
return x - y;
}
You can’t perform that action at this time.