-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangularControllers.js
More file actions
30 lines (22 loc) · 1.39 KB
/
Copy pathangularControllers.js
File metadata and controls
30 lines (22 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var app = angular.module("myApp", []);
app.controller("myController", function($scope){
$scope.ciphars = [];
$scope.updateCiphars = function(){
if($scope.userText == "" || $scope.userText == undefined){
}else {
$scope.ciphars[0] = {name: "All Lower Case", code: $scope.userText.toLowerCase()};
$scope.ciphars[1] = {name: "All Upper Case", code: $scope.userText.toUpperCase()};
$scope.ciphars[2] = {name: "Proper Sentance", code: toProperSentance($scope.userText)};
$scope.ciphars[3] = {name: "Upper Case Each Word", code: toUpperEachWord($scope.userText)};
$scope.ciphars[4] = {name: "Binary", code: toBinary($scope.userText)};
$scope.ciphars[5] = {name: "Morse Code", code: toMorseCode($scope.userText)};
$scope.ciphars[6] = {name: "Randomize Letters", code: toRandLettering($scope.userText)};
$scope.ciphars[7] = {name: "Randomize Words", code: toRandWording($scope.userText)};
$scope.ciphars[8] = {name: "Reverse", code: toReverse($scope.userText)};
for(var i = 1; i < 26; i++){
$scope.ciphars[i + 8] = {name: "Caeser Cipher Rot" + i, code: toCaesar($scope.userText, i)}
;
}
}
};
});