xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>This Tutorial APP</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<style> .glyphicon-thumbs-up { cursor:pointer } </style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="node_modules/angular/angular.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.5.0/chart.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/angular.chartjs/latest/angular-chart.js" type="text/javascript" ></script>
<script src="node_modules/angular-resource/angular-resource.js"></script>
<script src="app.js" type="text/javascript"></script>
</head>
<body id="thisone" ng-app="flapperNews">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<ui-view></ui-view>
</div>
</div>
<script type="text/ng-template" id="/home.html">
<div class="page-header">
<h1>Flapper News</h1>
</div>
<br/>
<div ng-controller="formCtrl">
<h1>The Form</h1>
<form name="form.theForm">
<input value="city" name="type" type="text" ng-model="artist" />
<input type="text" name="type" ng-model="type" />
<input type="button" value="get some art" ng-click="getart()"/>
<input type="button" value="get some numers" ng-click="getnums()"/>
</form>
<pre>{{results | json}}</pre>
</div>
<div ng-controller="chartCtl">
<div ng-repeat="chart in charts" id="container" class="container">
<div class="row" ng-controller="MainCtrl">
<div class="col-lg-6 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading"><a href="#/detail/{{$index}}">Scatter chart</a></div>
<div class="panel-body">
<canvas class="chart chart-line" chart-data="data.array[$index]"
chart-options="options"></canvas>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-repeat="post in posts | orderBy: '-upvotes'" class="col-md-6 col-md-offset-3">
<span class="glyphicon glyphicon-thumbs-up"
ng-click="upinc(post)"></span>
<a href="{{post.link}}" ng-show="post.link">
{{post.title}}
</a>
<span ng-hide="post.link">
{{post.title}}
</span>
has {{post.upvotes}}
<span>
<a href="#/posts/{{$index}}">Comments</a>
</span>
</div>
<form ng-submit="addPost()"
style="margin-top:30px;">
<h3>Add a new post</h3>
<div class="form-group">
<input type="text"
placeholder="title"
ng-model="title"/>
</div>
<div class="form-group">
<input type="text"
placeholder="link"
ng-model="link"/>
</div>
<button type="submit">add post</button>
</form>
</script>
<script type="text/ng-template" id="/detail.html">
<div class="page-header">
<h1>Flapper News</h1>
</div>
<div class="page-header">
<h3>
<a ng-show="post.link" href="{{post.link}}">
{{post.title}}
</a>
<span ng-hide="post.link">
{{post.title}}
</span>
</h3>
</div>
<div ng-repeat="comment in post.comments | orderBy: '-upvotes'">
<span class="glyphicon glyphicon-thumbs-up"
ng-click="upinc(comment)"></span>
{{comment.upvotes}} - by {{comment.author}}
<span style="font-size:20px; margin-left:10px;">
{{comment.body}}
</span>
</div>
<form ng-submit="addComment()"
style="margin-top:30px;">
<h3>Add a new comment</h3>
<div class="form-group">
<input type="text"
class="form-control"
placeholder="Comment"
ng-model="body"></input>
</div>
<button type="submit" class="btn btn-primary">Post</button>
</form>
</script>
<script type="text/ng-template" id="/posts.html">
<div class="page-header">
<h1>Flapper News</h1>
</div>
<div class="page-header">
<h3>
<a ng-show="post.link" href="{{post.link}}">
{{post.title}}
</a>
<span ng-hide="post.link">
{{post.title}}
</span>
</h3>
</div>
<div ng-repeat="comment in post.comments | orderBy: '-upvotes'">
<span class="glyphicon glyphicon-thumbs-up"
ng-click="upinc(comment)"></span>
{{comment.upvotes}} - by {{comment.author}}
<span style="font-size:20px; margin-left:10px;">
{{comment.body}}
</span>
</div>
<form ng-submit="addComment()"
style="margin-top:30px;">
<h3>Add a new comment</h3>
<div class="form-group">
<input type="text"
class="form-control"
placeholder="Comment"
ng-model="body"></input>
</div>
<button type="submit" class="btn btn-primary">Post</button>
</form>
</script>
</body>
</html>
Modified http://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.js to a secure url
Updated missing url https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.js to https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.5.0/chart.bundle.js
https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js
https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.js
https://cdn.jsdelivr.net/angular.chartjs/latest/angular-chart.js