这是我从控制台得到的错误。我正在为本网站使用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>