This is my HTML code. Whenever I try to run the HTML page, I encounter an error message saying 'Cannot read property 'split' of undefined'
<!DOCTYPE html>
<html>
<head>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
<script>
var appModule=angular.module('appModule',[]);
appModule.filter('removeDashes',function(){
return function(text){
if(text!==undefined){
return text.split('-').join(' ');
}
}
});
appModule.controller('someCTRL',function($scope){
});
</script>
</head>
<body ng-app="appModule" ng-controller="someCTRL">
<input type="text" model="someDashedText">
<p>
{{someDashedText | removeDashes}}
</p>
</body>
</html>