Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-controller disables filter functionality #45

Open
brehouse opened this issue May 31, 2015 · 0 comments
Open

ng-controller disables filter functionality #45

brehouse opened this issue May 31, 2015 · 0 comments

Comments

@brehouse
Copy link

Hi all -

So, The filters work fine until I attach a controller to the container using ng-controller (doing this to grab the data from a JSON file). It does import the data from the JSON file, but the filter buttons no longer function.

HTML (using sample):

<!-- ISOTOPECONTAINER -->
<div class="row">
  <ul id="isotopeContainer" ng-cloak isotope-container ng-controller="QuoteController">
    <li isotope-item ng-repeat="x in xList"  class="kindling {{x.class}}" onClick="removeItem(this)">
       <div class="symbol">{{x.name}}</div>
       <div class="weight" date="{{x.date}}">{{x.date | date}}</div>
       <div class="number" number="{{x.number}}">{{x.number}}</div>
    </li>
</div>

app. js

var demo = angular.module('angular-isotope-demo', [ 
    'ngRoute', 
    'hljs',
    'quoteControllers',
    'iso.directives'
]);

controllers.js

var quoteControllers = angular.module('quoteControllers', []);

quoteControllers.controller('QuoteController', ['$scope', '$http', function($scope, $http) {
    $http.get('data.json').success(function(data) {
        $scope.xList = data;
    });
}]);

There seems to be a conflict with the isotope-container and the ng-controller, but I can't figure out the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant