Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem loading ui.scroll.jqlite #72

Closed
lavagu opened this issue Mar 23, 2016 · 17 comments
Closed

problem loading ui.scroll.jqlite #72

lavagu opened this issue Mar 23, 2016 · 17 comments

Comments

@lavagu
Copy link

lavagu commented Mar 23, 2016

I installed the ui-scroll with the ui-utils.

Even with the simple provided examples i'm getting error : viewport.offset is not function.

I tried to install the ui-scroll directly and now getting the error element.before is not a function
I know the issue is related to the jqlite, but can't add it in my bower. (errors). Where to to load it?

any help would be appreciated.

@mfeingold
Copy link
Contributor

Did you include the ui-scroll-jqlite (look here)

@lavagu
Copy link
Author

lavagu commented Mar 23, 2016

if i add ui-scroll-jqlite as depency,, my app won't load due failed load of ui.scroll.jqlite module.

@lavagu lavagu changed the title problem viewport problem loading ui.scroll.jqlite Mar 23, 2016
@lavagu
Copy link
Author

lavagu commented Mar 23, 2016

some more information.
i'm developping with gulp as buildsystem.

the vendor.js file in the .tmp is not containing the module ui.scroll.jqlite, only the ui.scroll.
i'm new to angular, so where can i load the ui.scroll.jqlite module?

@lavagu
Copy link
Author

lavagu commented Mar 23, 2016

solved my problem in a non elegant way (in my opinion)
i copied the content of ui.scroll.jqlite file into ui.scroll.
Now all is working fine. module is available.

@mackelito
Copy link

I´m actually having the same issue and for me copying the code into ui.scroll is not an option.. what am I missing?
The app loads when I don´t try to load 'ui.scroll.jqlite' ?

@mfeingold
Copy link
Contributor

Can you post a repro?

@mfeingold mfeingold reopened this Nov 29, 2016
@mackelito
Copy link

Just installed with npm and used webpack to create my build.js.

@dhilt
Copy link
Member

dhilt commented Dec 6, 2016

@mackelito it would be nice if you could create a git-repository (or give me a link if it exists) which contains your problem. For I may clone it and fix the issue.

@chillyistkult
Copy link

The problem is that the package only includes "main": "./dist/ui-scroll.js", as the main file and not jqlite and therefore many automated build systems only inject this dependency (in index.html).

@dhilt
Copy link
Member

dhilt commented Dec 8, 2016

@chillyistkult You know, "main" property could contain only one module link. And the problem is that ui-scroll has a conditional dependency: jQuery or ui-scroll-jqlite. What solution could be suggested here (except manual builder settings managing)? I really would not wish to include ui-scroll-jqlite source code into ui-scroll.js...

@mackelito
Copy link

how about providing it as a separate module?

@chillyistkult
Copy link

chillyistkult commented Dec 8, 2016

@dhilt You are right, there can be only one main file, but normally the library should work without having to care about additional dependencies (that are not automatically resolved).

@mackelito @dhilt Of course you could just add the missing dependency manually or (and that would be the best solution) add ui.scroll.jqlite as an independent module to bower and add the dependency to the bower.json of ui.scroll. That way automated build tools will be able to inject all the files that are needed to run ui.scroll.

But it's still awkward to have ui.scroll.jqlite as an angular module instead of (like the jquery way) a global function.

@mackelito
Copy link

@dhilt just a small question.. what differs the ui-scroll.jqlite from the jqlite in angular?

@chillyistkult
Copy link

ui.scroll.jqlite adds a few methods like element.before and element.after (and others) that are originally not included in angular's jqlite. I guess the reason for @dhilt to maintain an own module just to add this needed methods was to keep the library as lightweight as possible without having a hard dependency on full jquery.

@dhilt dhilt mentioned this issue Feb 1, 2017
@dhilt
Copy link
Member

dhilt commented Feb 4, 2017

A new version is released. Now jqLiteExtras service is a part of ui.scroll module. No need to apply it manually. The necessary check (for jQuery presence) and applying are being automatically performed during ui.scroll module run.

The ui.scroll.jqlite module is still there, but now it is just an empty stub. It is so for backward compatibility reasons.

@dhilt dhilt closed this as completed Feb 4, 2017
@dannydechtiar
Copy link

hi there, issue still exists. webpack returns "Can't resolve 'angular-ui-scroll'"
i do see the empty stub (sqlite file).
v1.6.0

thanks ahead.

@dhilt
Copy link
Member

dhilt commented Feb 10, 2017 via email

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

No branches or pull requests

6 participants