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
@{{ user.name }}

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

0 Comments

Leave a Comment.