Commit c483a756 authored by Daniel Teixeira's avatar Daniel Teixeira
Browse files

adding angular app for index.html

parent ff8dd160
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Beacon ArrayMap</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<script src="vendor/jquery.min.js"></script>
<script src="vendor/angular.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
<body>
<div ng-controller="BeaconController" ng-cloak class="container">
<div class="jumbotron">
<h1>Beacon ArrayMap</h1>
<p>Implementation of Beacon v0.2 for ArrayMap</p>
</div>
<form class="form-horizontal">
<div class="form-group">
<label for="chromosome" class="col-sm-2 control-label">Chromosome</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="chromosome" ng-model="beaconConfig.chromosome" placeholder="Chromosome">
</div>
</div>
<div class="form-group">
<label for="position" class="col-sm-2 control-label">Position</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="position" ng-model="beaconConfig.position" placeholder="Position">
</div>
</div>
<div class="form-group">
<label for="dataset" class="col-sm-2 control-label">Dataset</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="dataset" ng-model="beaconConfig.dataset" placeholder="Dataset">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a target="beacon" ng-href="{{getApiUrl()}}">{{getApiUrl()}}</a>
<!--<p></p>
<button type="submit" class="btn btn-default">Call ArrayMap Beacon</button>-->
</div>
</div>
</form>
</div>
<script src="js/index.js"></script>
</body>
</html>
\ No newline at end of file
angular.module('arrayMap', [])
.controller('BeaconController', ['$scope', '$location', function ($scope, $location) {
$scope.greetMe = 'World';
$scope.beaconConfig = {
"chromosome" : "9",
"position" : 57649422,
"dataset" : "8010/3"
}
$scope.getApiUrl = function (){
return $location.absUrl() + "v0.2/query?chromosome=" + $scope.beaconConfig.chromosome + "&position=" + $scope.beaconConfig.position + "&dataset=" + $scope.beaconConfig.dataset;
}
}]);
angular.element(document).ready(function() {
angular.bootstrap(document, ['arrayMap']);
});
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,8 @@ var arrayMap = require('../arraymap')
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
res.sendfile('index.html');
//res.render('index', { title: 'Express' });
});
/* GET home page. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment