Skip to content

In callback function array is not visible from scope #283

@bestin-it

Description

@bestin-it

Hi,

when you run $scope.AddItem function for example 3 times and call function $scope.Test you will see that the size of $scope.items is equal 3.
But when you click 'del' you will see that $scope.items size is 0.

Why ?

        hotkeys.bindTo($scope)
            .add({
                combo: 'del',
                description: 'blah blah',
                callback: function () {
                    $scope.Test();
                }
            })

           
            $scope.Test = function()
            {
                alert($scope.items.length);
            }

            $scope.AddItem = function()
            {
                $scope.items.push({ test: 'Test' });
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions