Skip to content
This repository has been archived by the owner on Dec 30, 2018. It is now read-only.

Work without jQuery #94

Closed
wants to merge 1 commit into from
Closed

Work without jQuery #94

wants to merge 1 commit into from

Conversation

kenchan0130
Copy link

different from #41 approach.

maybe, using a lot of if block is not cool at all...

@passy
Copy link
Owner

passy commented Nov 21, 2014

Thanks for the patch, @kenchan0130. Why exactly did you go with all the conditionals? Why can't we always use the jQuery-free approach?

@kenchan0130
Copy link
Author

In my understanding,
it seems that your jQuery-free approach can't work in latest version.

<script src="masonry.pkgd.min.js"></script>
<script src="imagesloaded.pkgd.min.js"></script>
<script src="angular.min.js"></script>
<script src="angular-masonry.min.js"></script>

In this case, the following errors can occur.

Uncaught TypeError: undefined is not a function
angular.js:9037 TypeError: undefined is not a function
    at preLink (http://localhost:8000/angular-masonry.js:117:19)
    at S (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:49:122)
    at h (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:43:59)
    at h (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:43:76)
    at S (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:49:246)
    at h (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:43:59)
    at h (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:43:76)
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:42:114
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:17:459
    at g.$eval (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js:100:198) <div masonry="">

so, I added the conditionals.

@passy
Copy link
Owner

passy commented Nov 28, 2014

Sorry, I'm a bit confused by this. I still don't quite get why that split is necessary.

@kenchan0130
Copy link
Author

In view of performance on mobile, I have not added jQuery in certain project.
However, this library is jQuery dependent. so, I must include jQuery.

@2013gang
Copy link

2013gang commented Dec 3, 2014

Is it because latest masonry went vanilla, and angular masonry is assuming jquery loaded in masonry?

@passy
Copy link
Owner

passy commented Dec 3, 2014

But the goal should be to completely remove the dependency on jQuery, which I thought would be possible. The other patch was almost there, just had some issues with the patches if I recall correctly.

@2013gang
Copy link

2013gang commented Dec 3, 2014

+1

Thanks!

@KrisBraun
Copy link

This PR is working for me without jQuery in my project. Would be great to see it merged into master for the next release.

@npgauth
Copy link

npgauth commented Dec 9, 2014

+1 will this be merged?

@passy
Copy link
Owner

passy commented Dec 9, 2014

Sorry, but as I mentioned this is not the approach I'd like to see. I'm still very much in favor of removing the jQuery dependency, but I much prefer the way #41 took.

@npgauth
Copy link

npgauth commented Dec 9, 2014

Got ya - thanks!

@passy
Copy link
Owner

passy commented Jan 15, 2015

Closing since this has been stale. Feel free to comment or re-submit an updated PR.

@passy passy closed this Jan 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants