OptimalBPM / angular-schema-form-dynamic-select

AngularStrap and AngularUI dynamic select implementation(static/sync/async/http, filters) for Angular Schema Form
MIT License
55 stars 45 forks source link

easier ui-select integration or another async search-autocomplete (GET/POST) #37

Closed portokallidis closed 9 years ago

portokallidis commented 9 years ago

Hello , I struggled for the past 2 hours to get the ui-select working with no luck. I followed the instructions but it keeps throwing

       Uncaught ReferenceError: angularSchemaFormDynamicSelect is not defined

But the strange is that if i add it as an inline-script from the demo page it loads but then it has other problems, something for directive injections. I am on a dead end and i cant find any schema form autocomplete search plugin at all. I dont know but i think an async seach-autocomplete is pretty basic stuff and very useful. Do you have any suggestions?

nicklasb commented 9 years ago

The problem is a bug in the gulp-umd module loader generator. I think. It seems to generate code that doesn't work with some module loaders, ironically. I use SystemJS, which is bitten but this. So I just saw this the other day, as a quick fix; manually remove the return angularSchemaFormDynamicSelect from end of the /angular-schema-form-dynamic-select.js- code. Actually, I am not completely sure how to solve this, If I remove that row manually I will likely break it for other loaders. And I have really no way to test that for all.

I have created an issue at gulp-umd: https://github.com/eduardolundgren/gulp-umd/issues/17

nicklasb commented 9 years ago

BTW, don't worry, it works, and if it doesn't work, I'll fix it, I use it extensively, so it has to work.

portokallidis commented 9 years ago

Ok i see, thanks for the info. I will try it too

nicklasb commented 9 years ago

Are you having other problems beyond the "is not defined"-stuff?

portokallidis commented 9 years ago

Yes and now i just figured out why... i loaded both angular-schema-form-ui-select and angular-schema-form-dynamic-select so it cannot play well with directive injections

nicklasb commented 9 years ago

Aha, no, you are right. They are basically the same add-on and forked from the same base repo, so they do not work well together. On the other hand, there is no reasonable use case for that combination.

nicklasb commented 9 years ago

Worked around in v0.11.7. However, this is not optimal as I am doing it only because I cannot see it breaking anything, I have so far not heard anything from the gulp-umd maintainer.

LeonardoGentile commented 8 years ago

Hi @nicklasb, I've tried to make some modification to the source code and then used gulp for creating the distribution files. This problem is still happening. You solution (delete that row) works for the un-minified file. Now, I might be wrong but when you build the minified file you don't start from the un-minified one, basically you create another task very similar to the one generating the un-minified. This basically leaves the problem on the minified file, because might not be that easy to manually delete the correct row.

If you havent found a better solution, maybe a sort of fix would b to generate the minified from the (manually patched) un-minifed one?

nicklasb commented 8 years ago

I am not getting the problem in the minified files?

nicklasb commented 8 years ago

For some strange reason.

LeonardoGentile commented 8 years ago

After running the gulp task I do get the error also in the minified version. I guess deleting the correct line manually in the minified file is a bit more difficult..and honestly we should not do that, better to fix the problem at the source or change the gulp plugin to generate the umd if the problem eduardolundgren/gulp-umd#17 won't be fixed

nicklasb commented 8 years ago

I agree totally.

gatperdut commented 7 years ago

I found this Uncaught ReferenceError: angularSchemaFormDynamicSelect is not defined problem. I tried using the minified version, unminified, and unminified and minimyzing it myself...no luck.

albertjose commented 7 years ago

I too have this error after use gulp umd, btw, all works fine.