Using Laravel Blade with AngularJS

By default, Laravel ‘s Blade template engine and AngularJS both use double curly brackets to display variables. Although, There few solutions out there to resolve this conflict, such as changing Laravel’s or Angular’s tags (curly brackets). I prefer to fix this issue using an easier method.

Quick Tip : Route parameters outside controller

All you need to do is prefix angular brackets with an @ symbol,

//Laravel code
{{ $name }}

//AngularJS code
@{{ }}

The @symbol prevents the blade template engine from parsing it.


Leave a Comment.