How can I incorporate an angular JS in flask python framework?

Please bare with me as I have a background in mechanical engineering. I’m hosting a small website using flask. I recently came across a nice project called “gamepad HTML5”, it basically shows me all the info about the gamepad connected to my computer. I took the code from github and could make it work in my codepen:

https://codepen.io/diamondx911/pen/mBgYgJ

But when I try to put it in my html folder it doesn’t work (note that I also copied the js and css to their respective folder). flask is throwing the following error:

TemplateSyntaxError: unexpected char u'$' at 1868

I think it is due to this syntax :

<h2 class="active"><span class="icon">{{$index + 1}}  </span><span>{{gamepad.id}}</span></h2>

I tried to install an angular js using by installing triangle:

http://flask-triangle.readthedocs.io/en/develop/tutorial/part1.html

Still, it didn’t not solve my problem. Any help is appreciated. Thanks a lot in advance !

Source: AngularJS