Thats because they reference the same class "momentary ". try giving all <div>'s a different class, and changing the reference to momentary in the function to match the class.
Or you could just add all the buttons in one template, sending a payload "true/false" and a topic "up/down/left/right/zoom in/out".
Than you can route with a switch on the topic.
[{"id":"4a193389.e055ac","type":"ui_template","z":"bf9e1e33.030598","group":"4ba5d415.d302ec","name":"Toggle Button","order":1,"width":"0","height":"0","format":"<div>\n <md-button ng-mousedown=\"send({payload: true, topic: 'up'})\" ng-mouseup=\"send({payload: false, topic: 'up'})\" style=\"width:100%; height:48px; margin: 0px\">up</md-button>\n <md-button ng-mousedown=\"send({payload: true, topic: 'down'})\" ng-mouseup=\"send({payload: false, topic: 'down'})\" style=\"width:100%; height:48px; margin: 0px\">down</md-button>\n</div>\n\n","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"local","className":"","x":250,"y":80,"wires":[["fa34fe67.be89c"]]},{"id":"fa34fe67.be89c","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":430,"y":80,"wires":[]},{"id":"4ba5d415.d302ec","type":"ui_group","name":"Control","tab":"47f0556b.db072c","order":1,"disp":true,"width":"6","collapse":false},{"id":"47f0556b.db072c","type":"ui_tab","name":"ICM","icon":"dashboard"}]