After spending too much time on this, I finally found out what the problem was. As it turns out, when URL is multiple sections deep (like in my situation), a forward slash has to be prepended to the
templateUrl value. In my case it had to be something like this:
Seems such a simple solution, but it caused me too much headache. I'm posting this in case anyone encounters a similar problem.
The credit goes to this answer.