title: TypeError: Cannot read property 'split' of undefined
body: <p>This is my HTML file. When i am running the HTML page it is showing error,'Cannot read property 'split' of undefined'</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
        &lt;html&gt;
              &lt;head&gt;
                  &lt;script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"&gt;&lt;/script&gt;
  
                  &lt;script&gt;
                       var appModule=angular.module('appModule',[]);
                       appModule.filter('removeDashes',function(){
                           return function(text){
                               if(text!==undefined){
                                   return text.split('-').join(' ');
                               }
                           }
                       });
                       appModule.controller('someCTRL',function($scope){
                       });
                  &lt;/script&gt;
               &lt;/head&gt;
  
               &lt;body ng-app="appModule" ng-controller="someCTRL"&gt;
              &lt;input type="text" model="someDashedText"&gt;
              &lt;p&gt;
                  {{someDashedText | removeDashes}}
              &lt;/p&gt;
          &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>