I am developing a web application using AngularJS (i.e. Angular 1). Although the title may seem trivial, I find myself facing a rather complicated problem (I think). The problem