question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AngularJS - just a FYI

See original GitHub issue

Just a quick note in case anyone else was trying to combine handlebars templates with AngularJS client side.

I couldn’t find anywhere within the Handlebars configuration to change the delimiters from {{ }} so I could include AngularJS code so to solve this problem I modified my AngularJS code to use a different delimiter:

//This allows angular binding inside a handlebars template
function handlebarsBinding($interpolateProvider) {
    $interpolateProvider.startSymbol('{[{').endSymbol('}]}');
}
angular.config(handlebarsBinding)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
redbencommented, Oct 27, 2014

You could also just escape the delimiter ****{{ngExpression}}. It works for me :

<h2>{{thisIsForHandleBars}}</h2>
<p>\{{thisIsForAngular}}</p>
0reactions
nicholaswmincommented, Nov 25, 2018

@ericf Is it possible to have the Handlebars delimiter configurable? i.e use %% instead of {{.

Remembering to escape the delimiter every time is error prone but on the other hand handlebars.js doesn’t seem to support it, so I doubt this project ever will.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using success/error/finally/catch with Promises in AngularJS
... answers are correct, but here is another example (just a f.y.i, success() and error() are deprecated according to AngularJS Main page:
Read more >
bclinkinbeard/angular - GitHub
GitHub - bclinkinbeard/angular: AngularJS compiled with jsdom and provided ... method var injector = angular.injector(['ng']); // provided only as an FYI, ...
Read more >
AngularJS Directives - Basics - One Hungry Mind
Yes, and this is where directives come in. Directives are a way to teach HTML new tricks. For instance, a brand new element...
Read more >
Angularjs called from an extension? - CiviCRM Stack Exchange
I am trying to create an extension with angularjs forms. I have followed the development guide and have created the angularjs page but...
Read more >
3 Web Technologies Killed by Google | by Louis Petrik
The technology behind AngularJS is simply outdated — because modern frameworks like React, Vue, and Angular all use a CLI by now.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found