Ad

Angularjs Not Working Inside Laravel Form

- 1 answer

I have a problem with calling angularjs inside laravel form, this is my code:

{!! Form::open(array('url' => 'widgets/@{{ widget.id }}'!!}

it's throw this error

Error while interpolating: http://localhost:9000/widgets/{{ widget.id }}

is there a way to do it?

Ad

Answer

The @{{ }} cannot be used in another {{ }} or {!! !!}}. If you want to use it, you have to write "proper html" without the Form Builder, like so (dont forget csrf_field since you're not using the Form Builder) :

<form method="POST" action="widgets/@{{ widget.id }}">
{!! csrf_field() !!}
Ad
source: stackoverflow.com
Ad