Alright so I have a function that does a rotation of a string call rotateString() in a file call rot-n.js.
How can I access this function to be called on an ng-model in AngularJS to show the encrypted code in my view?
here is my code:
<html ng-app="cipherApp">
<head>
<title>ROT-N CIPHER</title>
<script type="text/javascript" src='https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js'></script>
<script type="text/javascript" src="rot-n.js"></script>
<script type="text/javascript" src="app.js"></script>
<link href='https://fonts.googleapis.com/css?family=Lato'
rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<textarea rows="8" cols="45" ng-model="cipher.encryptIn"></textarea> <input type="number" min="0" max="25" ng-model="cipher.rotN">
<p>{{rotateString(cypher.encryptIn, cypher.rotN)}}</p>