Performs a smooth page scroll to an anchor Jquery

$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});

source https://css-tricks.com/snippets/jquery/smooth-scrolling/

AngularJS-Twig conflict with double curly braces

solution 1

You can change the start and end interpolation tags using interpolateProvider service. One convenient place for this is at the module initialization time.

angular.module('myApp', []).config(function($interpolateProvider){
    $interpolateProvider.startSymbol('{[{').endSymbol('}]}');
});

Solution 2

You can use too the attribute-based directive <p ng-bind="yourText"></p> is the same as <p>{{yourText}}</p>

Solution 3

Verbatim, is very elegant and readable for several angular variables:

<table ng-table>
    {% verbatim %}
        <tr ng-repeat="user in $data">
        <td data-title="'Name'">{{user.name}}</td>
        <td data-title="'Age'">{{user.age}}</td>
        </tr>
    {% endverbatim %}
</table>