Ng-include not functioning inside of ng-view templates


File Structure:


I have an ng-include inside of my submissions.html:

<ng-include src="'app/partials/navbar.html'" ></ng-include>

Nothing shows up. However, if I stick the same thing into index.html, the navbar shows up. I thought it might have to do with relative apths to the current html file, so I tried src="'../partials/navbar.html'" with no luck either.

Is there something special that needs to be done to get an ng-include to show inside of an ng-view template?

Similar Questions that did not help:


The issue turned out to be my browser cache in Google Chrome. The ng-include was not showing up in the HTML untill I manually cleared my cache. Each time the ng-include is changed or moved in that file, I have to clear my cache, this is not necessary if it is in index.html.

After some testing, this issue does not exist in Edge, but it does exist in Firefox.

Chrome version: 53.0.2785.116 m

Angular cannot find "app" in the directory path. Try adding a tilde at the beginning:

<ng-include src="'app/partials/navbar.html'" ></ng-include>

Should be:

<ng-include src="'~/app/partials/navbar.html'" ></ng-include>
By : Dave Kaye

If I am reading this correctly, Message would contain a List<MessageUser>.

If that's the case then this should get you close:

var List<Message> messages = 
    ( from m 
      in db.Messages 
          m.UserID == userid || m.MessageUsers.Any(mu => mu.UserID == userID) 
      select m).ToList();
By : Sam Axe

This video can help you solving your question :)
By: admin