0

I playing with AngularJS, now when I want to follow this example:

Everthings works untill when I want to fire up the last event: clearCompleted(); My browser complains right away saying:

$scope.clearCompleted = function(){

        $scope.todos = _.filter($scope.todos, function(todo){
                    return !todo.done;
                });

    };

ReferenceError: _ is not defined at Object.TodoCtrl.$scope.clearCompleted

and I knwo that it just this event...wondering why? I also dont understand this syntax: _.filter (what is this _.?) I have feeling that is this: ** _.filter(....**

any idea?

Thanks very much for yr time! Y/

1 Answer 1

1

It seems as if your trying to use Underscore.js without including it in a script tag.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.