This is an example of functionality with AngularJS. I used it to create a menu in script form so that it can be accessed by multiple pages without rewriting code.