-
Notifications
You must be signed in to change notification settings - Fork 77
Description
'use strict';
var App;
App = angular.module('app', ['ngCookies', 'ngResource', 'ngRoute', 'app.controllers', 'app.directives', 'app.filters', 'app.services', 'partials']);
App.config([
'$routeProvider', '$locationProvider', function($routeProvider, $locationProvider, config) {
$routeProvider.when('/todo', {
templateUrl: '/partials/todo.html'
}).when('/view1', {
templateUrl: '/partials/partial1.html'
}).when('/view2', {
templateUrl: '/partials/partial2.html'
}).otherwise({
redirectTo: '/todo'
});
return $locationProvider.html5Mode(false);
}
]);
;// Generated by CoffeeScript 1.6.3
'use strict';
var App;
App = angular.module('app', ['ngCookies', 'ngResource', 'ngRoute', 'app.controllers', 'app.directives', 'app.filters', 'app.services', 'partials']);
App.config([
'$routeProvider', '$locationProvider', function($routeProvider, $locationProvider, config) {
$routeProvider.when('/todo', {
templateUrl: '/partials/todo.html'
}).when('/view1', {
templateUrl: '/partials/partial1.html'
}).when('/view2', {
templateUrl: '/partials/partial2.html'
}).otherwise({
redirectTo: '/todo'
});
return $locationProvider.html5Mode(false);
}
]);
;'use strict';
/* Controllers*/
angular.module('app.controllers', []).controller('AppCtrl', [
'$scope', '$location', '$resource', '$rootScope', function($scope, $location, $resource, $rootScope) {
$scope.$location = $location;
$scope.$watch('$location.path()', function(path) {
return $scope.activeNavId = path || '/';
});
return $scope.getClass = function(id) {
if ($scope.activeNavId.substring(0, id.length) === id) {
return 'active';
} else {
return '';
}
};
}
]).controller('MyCtrl1', [
'$scope', function($scope) {
return $scope.onePlusOne = 2;
}
]).controller('MyCtrl2', [
'$scope', function($scope) {
return $scope;
}
]).controller('TodoCtrl', [
'$scope', function($scope) {
$scope.todos = [
{
text: "learn angular",
done: true
}, {
text: "build an angular app",
done: false
}
];
$scope.addTodo = function() {
$scope.todos.push({
text: $scope.todoText,
done: false
});
return $scope.todoText = "";
};
$scope.remaining = function() {
var count;
count = 0;
angular.forEach($scope.todos, function(todo) {
return count += (todo.done ? 0 : 1);
});
return count;
};
return $scope.archive = function() {
var oldTodos;
oldTodos = $scope.todos;
$scope.todos = [];
return angular.forEach(oldTodos, function(todo) {
if (!todo.done) {
return $scope.todos.push(todo);
}
});
};
}
]).$controller('CalcCtrl', [
'$scope', function($scope) {
return $scope.studentRecord = {
student: {
firstName: 'M',
lastName: 'C',
studentNumber: '08',
courses: [
{
courseName: '3X03',
courseAssignmentMark: [90, 100, 78, 96, 67],
courseName: '4X03',
courseAssignmentMark: [20, 34, 32, 90, 67]
}
]
}
};
}
]);
;// Generated by CoffeeScript 1.6.3
'use strict';
/* Controllers*/
angular.module('app.controllers', []).controller('AppCtrl', [
'$scope', '$location', '$resource', '$rootScope', function($scope, $location, $resource, $rootScope) {
$scope.$location = $location;
$scope.$watch('$location.path()', function(path) {
return $scope.activeNavId = path || '/';
});
return $scope.getClass = function(id) {
if ($scope.activeNavId.substring(0, id.length) === id) {
return 'active';
} else {
return '';
}
};
}
]).controller('MyCtrl1', [
'$scope', function($scope) {
return $scope.onePlusOne = 2;
}
]).controller('MyCtrl2', [
'$scope', function($scope) {
return $scope;
}
]).controller('TodoCtrl', [
'$scope', function($scope) {
$scope.todos = [
{
text: "learn angular",
done: true
}, {
text: "build an angular app",
done: false
}
];
$scope.addTodo = function() {
$scope.todos.push({
text: $scope.todoText,
done: false
});
return $scope.todoText = "";
};
$scope.remaining = function() {
var count;
count = 0;
angular.forEach($scope.todos, function(todo) {
return count += (todo.done ? 0 : 1);
});
return count;
};
return $scope.archive = function() {
var oldTodos;
oldTodos = $scope.todos;
$scope.todos = [];
return angular.forEach(oldTodos, function(todo) {
if (!todo.done) {
return $scope.todos.push(todo);
}
});
};
}
]).$controller('CalcCtrl', [
'$scope', function($scope) {
return $scope.studentRecord = {
student: {
firstName: 'M',
lastName: 'C',
studentNumber: '08',
courses: [
{
courseName: '3X03',
courseAssignmentMark: [90, 100, 78, 96, 67],
courseName: '4X03',
courseAssignmentMark: [20, 34, 32, 90, 67]
}
]
}
};
}
]);
;'use strict';
/* Directives*/
angular.module('app.directives', ['app.services']).directive('appVersion', [
'version', function(version) {
return function(scope, elm, attrs) {
return elm.text(version);
};
}
]);
;'use strict';
/* Filters*/
angular.module('app.filters', []).filter('interpolate', [
'version', function(version) {
return function(text) {
return String(text).replace(/%VERSION%/mg, version);
};
}
]);
;'use strict';
/* Sevices*/
angular.module('app.services', []).factory('version', function() {
return "0.1";
});
;// Generated by CoffeeScript 1.6.3
'use strict';
/* Sevices*/
angular.module('app.services', []).factory('version', function() {
return "0.1";
});
;
//# sourceMappingURL=app.js.map