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

Is there a jQuery dependency? #5

Closed
CKarper opened this issue May 28, 2014 · 8 comments
Closed

Is there a jQuery dependency? #5

CKarper opened this issue May 28, 2014 · 8 comments

Comments

@CKarper
Copy link

CKarper commented May 28, 2014

The summary at http://moonstorm.github.io/trNgGrid/ says the only dependencies are angular and bootstrap, the readme here says it also requires jQuery...

Which is it? I have no desire to add jQuery to my project, so I'm hoping that's old info.

If there is a dependency, what do I lose if I don't have it? Can it be removed relatively easily?

@MoonStorm
Copy link
Owner

Good point. Let me take a peek at the source code.

@MoonStorm
Copy link
Owner

Had a look and I remembered. Obviously only after attempting to remove the jQuery dependency. In essence, without jQuery, Angular switches itself into what the authors like to call jqLite which, to be blunt, is a piece of ***. There are good reasons why jQuery is as useful and stable as it is now.

This is one of the issues:
https://groups.google.com/forum/#!topic/angular/7poFynsguNw
Unfortunately it's a big one for dynamic DOM table elements, don't you think? Probably why everyone else attempting to build a grid with Angular is using DIVs? Can only speculate.

Nothing is stopping you from forking this project and having lots of fun with jqLite. I've decided I'd stick with something that I know it works.

@CKarper
Copy link
Author

CKarper commented May 28, 2014

So, is it only being used for node creation? Would it be possible to just
use the native DOM methods for that?
On May 28, 2014 8:24 AM, "MoonStorm" notifications@github.com wrote:

Had a look and I remembered. Obviously only after attempting to remove the
jQuery dependency. In essence, without jQuery, Angular switches itself into
what the authors like to call jqLite which, to be blunt, is a piece of ***.
There are good reasons why jQuery is as useful and stable as it is now.

This is one of the issues:
https://groups.google.com/forum/#!topic/angular/7poFynsguNw
Unfortunately it's a big one for dynamic DOM table elements, don't you
think? Probably why everyone else attempting to build a grid with Angular
is using DIVs? Can only speculate.

Nothing is stopping you from forking this project and having lots of fun
with jqLite. I've decided I'd stick with something that I know it works.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-44399293
.

@MoonStorm
Copy link
Owner

Angular as a technology just brings very good dev practices in the web world, at the expense of speed, reason why in my mind jQuery is fine to tag along. We could just work with plain strings when we need to work with new HTML elements, until after they get added to the DOM. Is it worth paying the price of having ugly string concatenations everywhere? Don't know.

May I ask why you're so keen on removing jQuery as a dependency from your project?

@CKarper
Copy link
Author

CKarper commented May 28, 2014

Well, to be fair, I'm not hell bent on it. And I'm new enough to Angular
that I'm not able to easily comb through the code and answer my own
questions yet.

But, as I don't have jQuery as a dependency now, it's kind of a heavy thing
to add if it's not necessary. I don't hate the idea, but I would avoid it
if i was just used without consideration. Clearly, you considered it,
and it's just part of the price to pay.

I played with the lib for a while last night, and just couldn't get it to
work for me. I'm using a MEAN stack, with jade as my engine, and I just
kept getting Search bars instead of records using the .js lib. I
appreciate your time and consideration. :- Hopefully, I'll get better
quickly and can figure out what's up at some point.

Chris

On Wed, May 28, 2014 at 9:06 AM, MoonStorm notifications@github.com wrote:

Angular as a technology just brings very good dev practices in the web
world, at the expense of speed, reason why in my mind jQuery is fine to tag
along. We could just work with plain strings when we need to work with new
HTML elements, until after they get added to the DOM. Is it worth paying
the price of having ugly string concatenations everywhere? Don't know.

May I ask why you're so keen on removing jQuery as a dependency from your
project?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-44403449
.

@CKarper
Copy link
Author

CKarper commented May 28, 2014

http://plnkr.co/edit/vUd0AQJMSLYC61fNGBA0?p=preview

Here's a plunker showing my issue...

@MoonStorm
Copy link
Owner

The jquery.js ref should go before angular.

@CKarper
Copy link
Author

CKarper commented May 29, 2014

That's blindingly obvious in retrospect. Thanks. :-)

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

No branches or pull requests

2 participants