-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
22 lines (19 loc) · 1.06 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var codeChallengesApp = angular.module('codeChallengesApp', []);
codeChallengesApp.controller('ExcerciseListCtrl', function ($scope) {
$scope.excercises = [
{'name': 'SSH key konfigurieren',
'snippet': 'Distillery irony neutra organic fugiat. Meditation occaecat keytar cornhole, mixtape next level blue bottle et meh stumptown messenger bag mlkshk.'},
{'name': 'Fizzbuzz',
'snippet': 'Heirloom yr esse, pug beard VHS excepteur artisan sed photo booth intelligentsia. Qui sapiente +1 90\'s, occupy vegan williamsburg ea velit magna yuccie elit.'},
{'name': 'Dotfiles einrichten',
'snippet': 'Distillery cray pop-up semiotics minim laboris. Twee you probably haven\'t heard of them locavore, blue bottle DIY farm-to-table kickstarter hoodie pabst aliqua lomo.'}
];
// default Auswahl, $scope.orderProp = '-name'; umgekehrte Sortierung
$scope.orderProp = 'name';
$scope.setSelected = function(excercise) {
$scope.currentExcercise = excercise;
}
$scope.isSelected = function(excercise) {
return $scope.currentExcercise === excercise;
}
});