How to include js script file in componentUrl

Hello everyone, Please I would like to include a js file on a particular page using componentUrl. I am using core framework.
Please how do I do this? Your response is highly appreciated. Thanks

1 Like

Thanks Shastox for your reply. I tried this the error report was “SyntaxError: import declarations may only appear at top level of a module”
My code is displayed below:

File Upload

File Upload
  • Profile Picture
    			  <p>	
    				    <a id="take-picture-button"> 
    						<i class="icon f7-icons if-not-md">camera</i>
    						<i class="icon material-icons md-only">camera_enhance</i>
    					</a>
    			  </p>
    			 <p>	
    			   	<img src="" id="get-picture-result"/><br />
    				
    				<button class="button button-raised button-fill" @click="uploadPassport">Upload</button>
    			  
    			 </p>
    			</div>
    		  </div>
    		</li>
    	  </ul>
    	</div>
    </div>
    

Thanks for your suggestion and SyntaxError: import declarations may only appear at top level of a module link.
I have gone through it seems that their feedback there is not the same as my issue here.
Thank ones more for your response.

This is how to load scripts dynamically in runtime https://stackoverflow.com/a/14521482/1923913

1 Like