Both Angular.JS and Jekyll use {{
and }}
to mark beginning and end of an expression. So, if you're using both, there's a conflict and Jekyll will typically wipe out or mess with the Angular expressions.
One fix is to tell Angular to use different symbols via $interpolateProvider
, for example:
var app = angular.module('app', [],
function($interpolateProvider) {
$interpolateProvider.startSymbol('[[{').endSymbol('}]]');
});
Is there also a way to tell Jekyll to use different start and end symbols?
UPDATE: Why? Just trying to find a less invasive way to resolve the conflict, as my projects typically contain a lot more Angular markup than Jekyll markup.
The double curly braces come from Liquid templating language. I think you cannot change it.
Not sure what exactly you are trying to do, but you might get away by using the raw tag. This tells liquid to ignore the code that is placed inside it and it won't try to interpret it:
{% raw %}
{{ some angular code here }}
{% endraw %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With