@borjasalguero regarding your comment on why I am importing it instead of adding as external script in html, actually initially i had it as external script in html, but then optimized it to lazy load by adding the file 'shared/js/contact_dialog.js' in lazyLoadFiles .