passy / angular-masonry

An AngularJS directive for Masonry.
https://passy.github.io/angular-masonry
MIT License
1.12k stars 216 forks source link

getSize is not a function #156

Closed Taewa closed 8 years ago

Taewa commented 8 years ago

Hello. I am using Ionic and want to use masonry. Here is what I included to index.html

<script src="lib/jquery/dist/jquery.js"></script>
<script src="lib/jquery-bridget/jquery-bridget.js"></script>
<script src="lib/ev-emitter/ev-emitter.js"></script>
<script src="lib/desandro-matches-selector/matches-selector.js"></script>
<script src="lib/fizzy-ui-utils/utils.js"></script>
<script src="lib/outlayer/item.js"></script>
<script src="lib/outlayer/outlayer.js"></script>
<script src="lib/masonry/masonry.js"></script>
<script src="lib/imagesloaded/imagesloaded.js"></script>

<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- <script src="lib/angular/angular.js"></script> -->

<!-- Again!! angular-masonry dependencies -->
<script src="lib/angular-masonry/angular-masonry.js"></script>

As you can see I replaced angular.js to ionic.bundle.js because angular is included in ionic. And I get this error. TypeError: getSize is not a function

I made sure all files are correctly included via chrome inspector.

Taewa commented 8 years ago

Ok, I don't know why I always resolve problem after I post question.

When I downloaded all dependencies through bower install --save angular-masonry get-size.js was not included.

After I downloaded get-size bower install get-size

It works.

darrylivan commented 8 years ago

I had the get-size component in my bower components, but it was not in the list of includes that I got from the example. once i added the include, this problem was fixed for me.

TaylorAckley commented 8 years ago

Same thing happened to me.... included it right under jquery and now I have a clean console.

JeffreyATW commented 8 years ago

165 should fix this.