Total de postagens:
8
Karma:
40
Ingressou:
09/08/2017
Localização:
Turkey
Hey, I'm working on custom theme and I added some js file to -> themes/newtheme/views/shared/head.cshtml Here is my problem: Added script file dosen't work on my project but when I copy script block from this file and paste needed page, it's working. So why my script files dosent work with first method?
Total de postagens:
1390
Karma:
11685
Ingressou:
10/08/2012
Localização:
United States
As Sohel indicates, it's probably not being called before the HTML starts rendering.. I had similar issues with some scripts and the easiest solution was to just add those new scripts into the /Scripts/public.common.js file.
Total de postagens:
8
Karma:
40
Ingressou:
09/08/2017
Localização:
Turkey
Thank you guys. Problem solved. I guess script which I added not need to load on head tags. then I go required page and add script file like I copied custom theme. and its working.