1

I must be missing something but I still can't seem to figure out why Chrome won't render my AngularJS templates using the ng-include method? This works in Firefox, IE and Chrome Dev, but not the normal most up to date Chrome? Help welcomed. I have Boostrap set up and then a link to angualr.mn.js.

        <div ng-include="'templates/menu.html'" class="top"></div>    

        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="_includes/scripts/bootstrap.min.js"></script>

        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.min.js"></script> 

Next I have a template in a folder on the root level with the following HTML markup;

<div class="container">    
    <div class="row">    
        <div class="col-xs-12">
            <ul>
                <li>Home</li>
                <li>About</li>
                <li>Services</li>
            </ul>
        </div>
    </div>
</div>

Then I have added ng-app to my HTML tag. Do I need a script tag around my HTML template with an ID which is then referenced on my index.html?

Al-76
  • 1,738
  • 6
  • 22
  • 40
  • 1
    OK kids, found out why. Here's the answer if anyone else experiences the same issue. When I uploaded my files to a web server it all works fine. So it needs to run on a web server or on local host. – Al-76 Sep 27 '15 at 11:31
  • possible duplicate of [Can't open Angular app using file protocol in Chrome](http://stackoverflow.com/questions/23536450/cant-open-angular-app-using-file-protocol-in-chrome) – toskv Sep 27 '15 at 11:35

0 Answers0