Using external js & functions to bind data into HTML view