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

List is not defined with RequireJS #4

Open
tnguyen14 opened this issue Feb 16, 2014 · 11 comments
Open

List is not defined with RequireJS #4

tnguyen14 opened this issue Feb 16, 2014 · 11 comments
Milestone

Comments

@tnguyen14
Copy link

I am trying to use this plugin with RequireJS.

In my config, I already declared listjs as a dependency for this plugin.

However, when I use the plugin, I get this error Uncaught ReferenceError: List is not defined on line 521.

Can you help?

@Pwntastic
Copy link

I'm also unable to get this working properly with RequireJS. I've tried a few shims and things, but nothing seems to work.

@taichi-master
Copy link

I don't know if this is the standard solution, but it seems like the List has to be made global.

So what I did is to assign the "LIST" to List in domReady function.
i.e.
in main.js:
require(['domReady', 'list'], function(domReady, LIST) {
domReady( function() {
// global
List = LIST;

Of course no need to specify the "List" in your module any more.
in your module:
define(['list.pagination'],
function(ListPagination) {
var monkeyList = new List('test-list', {
valueNames: ['name'],
page: 3,
plugins: [ ListPagination({}) ]
});

by the way, no need to add any shim in main.js to make this to work.

@javve javve added this to the 0.2.1 milestone Aug 30, 2014
@javve
Copy link
Owner

javve commented Aug 30, 2014

This will be fixed in the next version! Nice that you found the bug 👍

@ReservedDeveloper
Copy link

Any update on this? There haven't been any commits since last year. Should we consider this project abandoned?

@Saturate
Copy link

Saturate commented Aug 5, 2015

@ReservedDeveloper I guess, nearly one year later and nothing has happend to fix it.

@ghost
Copy link

ghost commented Aug 14, 2015

+1

@ghost
Copy link

ghost commented Aug 14, 2015

@javve you have a expectation to fix it ?

@localdrive
Copy link

+1

2 similar comments
@jonatasfreitasv
Copy link

+1

@apijay
Copy link

apijay commented Oct 27, 2015

+1

@antoine3000
Copy link

Hi,
Is this fixed ? I still have the error Uncaught ReferenceError: List is not defined.

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

10 participants