Доброго всем
¡ ¡ ¡ ALL GLORY TO GLORIA ! ! !
0.18
Mojolicious::Plugin::JSUrlFor::Angular - Mojolicious routes as Angular javascript module.
# Instead of helper only use generator for produce static file # cd <your/app/dir> perl script/app.pl generate js_url_for_angular > public/js/url_for.js # In output file inspect/remove nonsecure routes # in javascript angular.module(moduleName, ['appRoutes', ...]) .config(function(appRoutes) { appRoutes.baseURL('https://foo.com'); }) .controller('fooControll', function (appRoutes) { var url = appRoutes.url_for(...); // see help inside generated js file });
Генерация маршрутов для Angular1 Mojolicious routes genenerator for Angular1. Forked from Mojolicious::Plugin::JSUrlFor.
None public
None options
perl script/app.pl generate js_url_for_angular > path/to/relative_file_name
Mojolicious::Plugin::JSUrlFor inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register;
Register plugin in Mojolicious application.
Михаил Че (Mikhail Che) <mche[-at-]cpan.org>
Please report any bugs or feature requests to Github https://github.com/mche/Mojolicious-Plugin-JSUrlFor-Angular/
Also you can report bugs to CPAN RT
Mojolicious::Plugin::JSUrlFor
Mojolicious
Mojolicious::Guides
http://mojolicio.us
To install Mojolicious::Plugin::JSUrlFor::Angular, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::JSUrlFor::Angular
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::JSUrlFor::Angular
For more information on module installation, please visit the detailed CPAN module installation guide.