How to Change AngularJS Template Brackets?

If you are using AngularJS with a template engine like Twig or Laravel’s Blade template engine, you might want to change its {{ curly braces }} to avoid any conflicts.

Useful Read : Set friendly names for validation attributes in Laravel

To change AngularJS delimiters use the following code,

<script>
var myNgApp = angular.module('myNgApp',[]);

myNgApp.config(function($interpolateProvider){
    $interpolateProvider.startSymbol('[[').endSymbol(']]');
});
</script>

 

0 Comments

Leave a Comment.