I am displaying some elements on a view using angular.js and trying to connect these dom elements using jquery connections.The elements are getting displayed properly but I am not able to use them inside the sscript tag.
<div ng-repeat = "impact in activity.text" style=" margin-right: auto;background: rgb(255, 255, 255);
                                      background: rgba(255, 255, 255, 0.7);
                                      min-width: 4em;
                                      min-height: 3em;
                                      max-width: 29ex;
                                      margin: 1.2em;
                                      padding: 0.6em;
                                      word-wrap: break-word;
                                    border: 1px solid rgb(200, 200, 200);
                                    border: 1px solid rgba(0, 0, 0, 0.2);
                                    border-radius: 16px;
box-shadow: 2px 5px 5px rgba(0,0,0,0.2);"  class="impact\{{$index}}" id="">
    \{{impact}}</div>
<script>
    $(document).ready(function() {
        $('div.impact\{{$index}}').connections({ from: 'div.actors' }).length;
        var connections = $('connection, inner');
        setInterval(function() { connections.connections('update') }, 10);
    });
</script>
</div>
Here I am generating unique class name for every element. But I get the error in console when I use the same value in script tag.
Uncaught Error: Syntax error, unrecognized expression: div.impact{{$index}}

$indexwhere you have the code and angular won't interpolate inside a script tag