jAlert

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

jAlert

horrido
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.

--
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 an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: jAlert

Herby Vojčík
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

Richard Eng wrote:

> 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.
>
> --
> 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 [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.

--
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 an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: jAlert

Herby Vojčík


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).

> 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
>
> Richard Eng wrote:
>> 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.
>>
>> --
>> 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 [hidden email]
>> <mailto:[hidden email]>.
>> For more options, visit https://groups.google.com/d/optout.
>

--
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 an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.