Skip to content

Commit ef152a5

Browse files
author
Phil Strong
committed
Merge pull request philstrong#1 from dfoelber/start
Start
2 parents 05a9b7f + e8dacd8 commit ef152a5

11 files changed

+8104
-47
lines changed

app/css/bootstrap.css

+6,158
Large diffs are not rendered by default.

app/index.html

+5-43
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,18 @@
22
<html lang="en" ng-app="myApp">
33
<head>
44
<meta charset="utf-8">
5-
<title>My AngularJS App</title>
5+
<title>My AngularJS TODO App</title>
6+
<link rel="stylesheet" href="css/bootstrap.css"/>
67
<link rel="stylesheet" href="css/app.css"/>
78
</head>
8-
<body>
9-
<ul class="menu">
10-
<li><a href="#/list">list</a></li>
11-
<li><a href="#/view2">view2</a></li>
12-
</ul>
13-
14-
<div ng-controller="TodoCtrl">
15-
16-
<h2>Total Todos: {{remaining()}}</h2>
17-
<h2 class="hdr late">Late</h2>
18-
<ul>
19-
<li ng-repeat="todo in late()">
20-
<h3>{{todo.title}}</h3>
21-
<div>{{timeSince(todo.due)}}</div>
22-
</li>
23-
</ul>
24-
25-
<h2 class="hdr today">Today</h2>
26-
<ul>
27-
<li ng-repeat="todo in today()">
28-
<h3>{{todo.title}}</h3>
29-
<div>{{timeSince(todo.due)}}</div>
30-
</li>
31-
</ul>
32-
33-
<h2 class="hdr today">Soon</h2>
34-
<ul>
35-
<li ng-repeat="todo in soon()">
36-
<h3>{{todo.title}}</h3>
37-
<div>{{timeSince(todo.due)}}</div>
38-
</li>
39-
</ul>
40-
41-
<h2 class="hdr today">Someday</h2>
42-
<ul>
43-
<li ng-repeat="todo in someday()">
44-
<h3>{{todo.title}}</h3>
45-
<div>{{timeSince(todo.due)}}</div>
46-
</li>
47-
</ul>
48-
</div>
49-
9+
<body style="background-color: #000; color: #fff">
10+
<div ng-view></div>
5011

5112
<!-- In production use:
5213
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>
5314
-->
5415
<script src="lib/angular/angular.js"></script>
16+
<script src="lib/ui-bootstrap-tpls-0.2.0.js"></script>
5517
<script src="js/app.js"></script>
5618
<script src="js/services.js"></script>
5719
<script src="js/controllers.js"></script>

app/js/app.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// Declare app level module which depends on filters, and services
55
angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives']).
66
config(['$routeProvider', function($routeProvider) {
7-
$routeProvider.when('/list', {templateUrl: 'partials/partial1.html', controller: TodoCtrl});
8-
$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: TodoCtrl});
9-
$routeProvider.otherwise({redirectTo: '/view1'});
7+
$routeProvider.when('/login', {templateUrl: 'partials/login.html', controller: LoginController});
8+
$routeProvider.when('/main', {templateUrl: 'partials/main.html', controller: MainController});
9+
$routeProvider.otherwise({redirectTo: '/login'});
1010
}]);
1111

app/js/controllers.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,14 @@ function TodoCtrl($scope) {
150150
{"title":"Walk","duration":600,"due":"2013-03-05T08:00:00.000Z","created":"2013-03-06T00:57:47.000Z","updated":"2013-03-06T00:57:47.000Z","completed":null,"deleted":false,"id":"b1-68691467-45"}
151151
];
152152
}
153-
154153
// TodoItemCtrl.$inject = [];
154+
// MyCtrl2.$inject = [];
155+
156+
function LoginController($scope, $location) {
157+
$scope.signIn = function() {
158+
$location.path('/main');
159+
};
160+
}
161+
162+
function MainController($scope) {
163+
}

0 commit comments

Comments
 (0)