Updated Angular syntax including global variable