You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain views require scripts & css that are specific for that view.
What is the recommended approach:
Create a separate module (subfolder) for the view
Manually create a script / link HTML element (using razor sections)
Use a secret Cassette API function that allows me to add a reference to a specific file that will not include all other files that are in the same folder
Something else?
The text was updated successfully, but these errors were encountered:
Option 1 - will work fine and scale nicely when you then want to refactor a large page script into nice small files :)
Option 2 - works, but you lose all the minification, etc.
Another possible option: Write your scripts and styles so they can be loaded into any page (e.g. check the URL before calling $(document).ready). The stick them all into a single module. However, This may result in a large amount of script to be parsed by the page, which then only uses a fraction.
You're right about option 1 - Cassette is such a relief, I can create many smaller assets without worrying about browser performance!
Thanks for that third suggestion. Although that's an interesting idea, I will stick with option 1 :)
Certain views require scripts & css that are specific for that view.
What is the recommended approach:
The text was updated successfully, but these errors were encountered: