Skip to content

Commit 2cc75c3

Browse files
author
Markus
committed
Start AngularJS project
Start AngularJS project
1 parent 29dfecb commit 2cc75c3

26 files changed

+39857
-0
lines changed

.project

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>o2r-platform</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
<nature>com.aptana.projects.webnature</nature>
11+
</natures>
12+
</projectDescription>

index.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
4+
<!-- Libraries JavaScript -->
5+
<script src="lib/jquery-1.12.3.min.js"></script>
6+
<script src="lib/bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
7+
<script src="lib/angular.js"></script>
8+
<script src="lib/angular-route.min.js"></script>
9+
10+
<!-- Libraries CSS -->
11+
<link rel="stylesheet" href="lib/bootstrap-3.3.6-dist/css/bootstrap.min.css">
12+
13+
<!-- Starter file -->
14+
<script src="js/app.js"></script>
15+
16+
<!-- Services -->
17+
<script src="services/publications.js"></script>
18+
19+
<body ng-app="starter" ng-controller="MainCtrl">
20+
<header>
21+
<nav class="navbar navbar-default">
22+
<div class="container">
23+
<div class="navbar-header">
24+
<a class="navbar-brand" href="#/">o2r platform</a>
25+
</div>
26+
<ul class="nav navbar-nav navbar-right">
27+
<li><a href="#/reader"><i class="fa fa-home"></i> Reader</a></li>
28+
<li><a href="#/author"><i class="fa fa-shield"></i> Author</a></li>
29+
</ul>
30+
</div>
31+
</nav>
32+
</header>
33+
34+
<!-- Main content and injected views -->
35+
<div id="main">
36+
37+
<div ng-view></div>
38+
39+
</div>
40+
</body>
41+
</html>

js/app.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
var app = angular.module('starter', ['ngRoute']);
2+
3+
// configure our routes
4+
app.config(function($routeProvider) {
5+
$routeProvider
6+
7+
// route for the home page
8+
.when('/', {
9+
templateUrl : 'templates/home.html',
10+
controller : 'HomeCtrl'
11+
})
12+
13+
// route for the home page
14+
.when('/reader', {
15+
templateUrl : 'templates/reader.html',
16+
controller : 'ReaderCtrl'
17+
})
18+
19+
// route for the about page
20+
.when('/author', {
21+
templateUrl : 'templates/author.html',
22+
controller : 'AuthorCtrl'
23+
});
24+
});
25+
26+
app.controller('MainCtrl', function($scope){
27+
28+
});
29+
30+
app.controller('HomeCtrl', function($scope){
31+
32+
});
33+
34+
app.controller('ReaderCtrl', function($scope) {
35+
36+
});
37+
38+
app.controller('AuthorCtrl', function($scope, publications) {
39+
$scope.publications = publications.getPublications();
40+
});
41+

lib/angular-route.min.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)