I'm relatively new to the ScriptRegistrar and how it works, and I'm impressed with what I've seen so far. I just wanted to ask though, what are the point of groups? Do they do anything special?
I thought perhaps you could specify groups in the layout and enable them on views as necessary, but this does not appear to be the case (from what I can find). So what is the practical use of groups?
-------------------------
EDIT
It turns out you can enable and disable groups on views, I just didn't see this before. Also, it does not work in partials, which is where I wanted to use it.
For reference, this is how I'm enabling and disabling groups:
In _Layout.cshtml:
In my View.cshtml:
It's pretty awesome how it works.
However, if I cut the code from the view and paste it into a partial, that
doesn't work. At all.
So my question is now, how can I enable script groups in a partial?
-------------------
Edit again
The view code above actually renders a new set of scripts, so I've got all my base scripts rendered twice. I tried enclosing it in curly braces, so it doesn't render at that point, but it doesn't include the groups in the ScriptRegistrar on the layout. In short, it doesn't work.
On a side note, I had to put the code into that "head" section or else it crashes because it doesn't know about those groups.
So I'm back to my original questions: How can I enable / disable script groups per view / partial, or what practical use are script groups?