砌体错误:错误的砌体元素:null

时间:2014-07-15 19:04:15

标签: javascript angularjs jquery-masonry masonry

这是我从控制台得到的错误。我正在为本网站使用angular.js,但我希望我可以使用常规masonry.js而不使用angular-masonry

Bad masonry element: null
q()masonry....min.js (line 9)
a = null
c = Object { columnWidth=200, itemSelector=".item"}
d()masonry....min.js (line 9)
ui.js()

JavaScript:

var container = document.querySelector('#container');
var msnry = new Masonry( container, {
  // options
  columnWidth: 200,
  itemSelector: '.item'
});

var msnry = new Masonry( '#container', {
  // options
});

HTML:

<div class="content">
   <div id="container" class="list-container tiles-column-wrapper">
      <div class="tiles-column item ng-scope" ng-class="{active: $routeSegment.$routeParams.artifactId === artifact.artifactId}" ng-repeat="artifact in artifacts | orderBy:'-postedTimestamp'">
      <div class="tiles-column item ng-scope" ng-class="{active: $routeSegment.$routeParams.artifactId === artifact.artifactId}" ng-repeat="artifact in artifacts | orderBy:'-postedTimestamp'">
      <div class="tiles-column item ng-scope" ng-class="{active: $routeSegment.$routeParams.artifactId === artifact.artifactId}" ng-repeat="artifact in artifacts | orderBy:'-postedTimestamp'">
    </div>
</div>

0 个答案:

没有答案