3

これを達成する方法を説明する素晴らしいチュートリアルがありますが、私はそれを正しく理解できないようです. これがそので、これが私の見解です。さらに奇妙なことに、コンソールにエラーが表示されません。

これが私のプロジェクトの HTML です。

 <div ng-controller="DrawingsController">
        <div class="controls">
            <label>Filter:</label>
            <button class="filter" data-filter="all">All</button>
             <button class="filter" data-filter=".category-{{category}}" ng-repeat="category in categories">{{category}}</button>

             <label>Sort:</label>
             <button class="sort" data-sort="myorder:asc">Asc</button>
             <button class="sort" data-sort="myorder:desc">Desc</button>
       </div>
  <div class="test">
        <div id="MixItUpContainer1" class="container">
             <div class="mix category-{{drawing.category}}" data-myorder="{{drawing.value}}" ng-repeat="drawing in drawings">Value : {{drawing.name}}</div>
        </div>
  </div>

                <div class="gap"></div>
                <div class="gap"></div>
 </div> <!-- end of DrawingsController -->

JS:

rustyApp.controller('DrawingsController', function DrawingsController($scope) {
$scope.categories = ['Soft', 'Elements'];

$scope.drawings = [{
    category: 'Elements',
    value: '1',
    source: 'http://placehold.it/350x150'
}, {
    category: 'Elements',
    value: '1',
    source: 'http://placehold.it/350x150'
}, {
    category: 'Elements',
    value: '2',
    source: 'http://placehold.it/350x150'
}, {
    category: 'Soft',
    value: '2',
    source: 'http://placehold.it/350x150'
}, {
    category: 'Soft',
    value: '3',
    source: 'http://placehold.it/350x150'
}];
});
4

0 に答える 0