jAlert

39 views
Skip to first unread message

Richard Eng

unread,
Dec 31, 2015, 6:59:34 AM12/31/15
to amber-lang
Is there any way to call JQuery's jAlert function from Amber? I've tried various ways, but none of them work (I get exception errors).

Thanks.

Herby Vojčík

unread,
Dec 31, 2015, 7:07:26 AM12/31/15
to amber...@googlegroups.com
Normal `JQuery current jAlert: #{'opt'->'val'. 'yaopt'->'yaval'}` should work. The real question is, how do you load it? It's an external library, you should integrate it into an Amber project properly (preferable get it via bower (not needed, but better; only hard requirement is being in the project tree somewhere, but you get version resolution etc. for free with bower), create .amd.json file with paths section for it in project root, if it does not have its own AMD loader, adding also shim dependency on jquery there (.amd.json file), then everything loads in proper order, and you can just use the previous statement.

Herby
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send
> a
n email to amber-lang+...@googlegroups.com
> <mailto:amber-lang+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Herby Vojčík

unread,
Dec 31, 2015, 7:09:11 AM12/31/15
to amber...@googlegroups.com


Herby Vojčík wrote:
> Normal `JQuery current jAlert: #{'opt'->'val'. 'yaopt'->'yaval'}` should
> work. The real question is, how do you load it? It's an external
> library, you should integrate it into an Amber project properly
> (preferable get it via bower (not needed, but better; only hard
> requirement is being in the project tree somewhere, but you get version
> resolution etc. for free with bower), create .amd.json file with paths
> section for it in project root, if it does not have its own AMD loader,

AMD header, I mean; that is, if AMD loader can load it directly (it has
define call).
Reply all
Reply to author
Forward
0 new messages