change Case of letters in a word through Angular JS..what is wrong with this code..Please guide me
ALL_CAPS_PAGE
<div ng-app="myApp" ng-controller="changeCase">
	<h2><p>ENTERED TEXT WILL BE CONVERTED TO UPPERCASE!</p></h2>
	
	<p>ENTER TEXT: <input type="string"  ng-model="word"></p>
            <button type="button" ng-click="convertIt()">convert</button>
	<p> {{ wordz}} </p>
	<p> {{showIt}} </p>
</div>

<script>
	var app = angular.module('myApp',[]);
	app.controller('changeCase',function($scope){
		
		$scope.showIt = function(){
			
			return $scope.word;
		};
		$scope.convertIt = function(){
			
			$scope.wordz = $scope.word.split();
			for (i=0; i<wordz.length(); i++)
			{
			<div ng-if "wordz.charCodeAt(i)>64 && wordz.charCodeAt(i)<91" >
			< wordz.charCodeAt(i) = wordz.charCodeAt(i) + 32 >
			</div>
			<div ng-if "wordz.charCodeAt(i)>96 && wordz.charCodeAt(i)<123" >
			< wordz.charCodeAt(i) = wordz.charCodeAt(i) - 32 >
			</div>
			}
			return $scope.wordz
		};
		
	});
	
</script>
Comments (0)