App.controller('todoController', function ($scope) {
    // create a message to display in our view
    $scope.todos = [{ name: 'angular', done: false }];
    $scope.clearTodo = function () {
        $scope.todos = _.filter($scope.todos, function (todo) {
            return !todo.done;
        });
    };
});问题-找不到符号_。我还需要补充什么?谢谢!
发布于 2014-01-02 01:03:37
_.filter是Underscore.js‘实用带’库的一部分。包括
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>在HTML中的“head”部分。
https://stackoverflow.com/questions/20874572
复制相似问题