How to call another scope function in AngularJS

Solution 1:

Since both functions are in the same scope you can simply call $scope.fn1() inside fn2.

Solution 2:

$scope.fn1 = function() {
    // do something A
};

$scope.fn2 = function() {
    // do something B
    // I want to call fn1 here.

    $scope.fn1(); // this works

};