Anzahl der Beiträge:
8
Karma:
40
Beigetreten:
09.08.2017
Herkunft:
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?
Anzahl der Beiträge:
1390
Karma:
11685
Beigetreten:
10.08.2012
Herkunft:
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.
Anzahl der Beiträge:
8
Karma:
40
Beigetreten:
09.08.2017
Herkunft:
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.