title: how to pass values between functions in the same scope
body: <p>I have 2 functions in the same controller and I am trying to pass the a value from one function to another. But I am getting an error TypeError: Cannot read property 'activeDataset' of undefined</p>
  
  <p>Here is my code:</p>
  
  <pre><code>angular.module('daModule').controller("Controller1",Controller1);
      Controller1.$inject = ['$scope', '$timeout'];
  function Controller1($scope, $timeout) {
  var ct = this;
  ct.datasetName = "demo";
  ...
  ct.activeDataset = function activeDataset(){
              return ct.datasetName;
  
          };
  }
  </code></pre>
  
  <p>Here is my other function in the same file</p>
  
  <pre><code>function fn1(Controller1) {
  ...
  var currentDataSet = Controller1.activeDataset();
  ...
  }
  </code></pre>
  
  <p>Don't know where I am going wrong.</p>