-
-
Save AshleyGrant/5af5c22be4b49c0e3fef327e3d8b986b to your computer and use it in GitHub Desktop.
Aurelia Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="bootstrap/css/bootstrap.css"></require> | |
<nav class="navbar navbar-default" role="navigation"> | |
<div class="navbar-header"> | |
<a class="navbar-brand" href="#"> | |
<i class="fa fa-user"></i> | |
<span> | |
Open API Designer | |
</span> | |
</a> | |
</div> | |
</nav> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<h2> | |
Design view | |
</h2> | |
Form fields placeholder | |
<div class="form-group"> | |
<label for="name"> | |
API Name | |
</label> | |
<input type="text" class="form-control" id="name" placeholder="Email" value.bind="swagger.name"> | |
</div> | |
<div class="form-group"> | |
<label for="name"> | |
API Version | |
</label> | |
<input type="text" class="form-control" id="name" placeholder="Email" value.bind="swagger.version"> | |
</div> | |
</div> | |
<div class="col-md-6"> | |
<h2>JSON Preview</h2> | |
<pre> | |
{ | |
"name": "${swagger.name}", | |
"version": "${swagger.version}" | |
} </pre> | |
</div> | |
</div> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {computedFrom} from 'aurelia-framework'; | |
export class App { | |
swagger; | |
constructor() { | |
this.swagger = { | |
name: 'Swagger doc', | |
version: 1 | |
}; | |
} | |
get swaggerString() { | |
console.log(this.swagger); | |
const swaggerStringified = JSON.stringify(this.swagger); | |
return swaggerStringified; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body aurelia-app> | |
<h1>Loading...</h1> | |
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/jspm_packages/system.js"></script> | |
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/config.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment