Home / Web Development Technologies / AngularJS / How to use AngularJS and Laravel Blade together

How to use AngularJS and Laravel Blade together

How to use AngularJS and Laravel Blade together

In this article I will show you how to use AngularJS and Laravel Blade together.
People who have been using AngularJS for a while may know of this solution. However if you are just getting started or have never used Angular with a templating engine like Blade, read ahead!

The problem

When it comes to making AngularJS and Laravel Blade work together, there is only one real problem. Both AngularJS and Laravel Blade use double curly brackets for opening and closing tags. Luckily there is a quick and painless solution for this problem!

The solution

The solution for making AngularJS and Laravel Blade work together is simple. We can simply use Angular’s $interpolateProvider to change the tags.

In short: we want to change the tags of AngularJS to anything other than double curly brackets, for example a double percentage sign.

Example code would be:

var customInterpolationApp = angular.module(‘customInterpolationApp’, []);

customInterpolationApp.config(function($interpolateProvider) {

You can now freely use %% for AngularJS and the usual {{ and }} for Laravel Blade!
If you liked this quick little tip, please share it on Facebook. Twitter, , StumbleUpon, Instagram etc

Check Also

laravel file uploading

Laravel File Uploading

Laravel File Uploading Uploading Files in Laravel is very easy. All we need to do …

MongoDB Features and future

MongoDB Features and Future

MongoDB Features and Future. Welcome to the world of MongoDB. This article delivers a brief …

Leave a Reply

Your email address will not be published. Required fields are marked *