in reply to Re^4: Perl Restfull call by Angular JS not working
in thread Perl Restfull call by Angular JS not working

...Failed to serialize the request: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) ...As I understand '/' failed to return the JSON which is true because I don't want to return JSON from '/' it should use 'template index'. Can anybody suggest how to accomplish this ?

If you want two serializers, you're going to need two apps, and a Plack::Builder to manage them , thats the lesson from Add serializer breaks Dancer2 app · Issue #833 · PerlDancer/Dancer2 · GitHub/Serial Serializer - making API writing easier | PerlDancer Advent Calendar

app.pl: use MyApp; use MyApp::JSONED; use Plack::Builder; builder { mount '/' => MyApp->to_app; mount '/json' => MyApp::JSONED->to_app; };