I have investigated far and wide for an explanation and solution to this problem, but now put my hands up and ask for your help!

On my SP 2013 cloud-based site, I have Home.aspx with a CEWP, which opens the index.html file containing AngularJS app (v1.4.2) :

<!DOCTYPE html>
<html ng-app="testLabApp">
    <meta charset="utf-8" />
    <title>Store search and activity booking tool</title>
    <script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="/_layouts/15/sp.js"></script>
    <script type="text/javascript" src="/sites/testlab/Webparts/js/jquery-1.11.3.min.js"></script></script>
    <script type="text/javascript" src="/sites/testlab/Webparts/js/angular.js"></script>
    <script type="text/javascript" src="/sites/testlab/Webparts/js/angular-route.min.js"></script>
    <script type="text/javascript" src="/sites/testlab/Webparts/testLabApp/testLabApp.js"></script>
    <script type="text/javascript" src="/sites/testlab/Webparts/testLabApp/extfunctions.js"></script>
    <script type="text/javascript" src="/sites/testlab/Webparts/testLabApp/dal.js"></script>
    <link href="/sites/testlab/Webparts/testLabApp/style.css" rel="stylesheet" />
    <div class="container body-content" ng-view>
        <!-- View content -->

I used Windows 7 with IE 11 for development, but then discovered that under Emulation for IE9 nothing appears on the Home.aspx page. Non errors in the console and I cannot determine via debugging where it is going wrong.

So, my first question is whether anyone has had success with SP 2013, Angularjs (any version) and IE 9. If so, what are your browser security settings?

IFRAMEs Secondly, I have tried using an IFRAME on the Home.aspx calling index.aspx (renamed from index.html) and with a Page View WP (same as IFRAME).

This only partially works, because although the app displays content and reads from SP Lists with REST, it cannot write to the lists - Security Violation.

Also, I cannot get the user's login name using _spPageContextInfo from within the IFRAME.

Any ideas please?

  • 1
    Have you tried using the data- prefix on the angular attributes, so it says data-ng-view instead of just ng-view?
    – user2536
    Sep 29, 2015 at 7:16
  • @DanielZiga No, I have not. What does the data- mean? Sep 29, 2015 at 8:48
  • It's just a attribute prefix that is recommended to try as some "older" browsers might not approve custom attributes without that prefix.
    – user2536
    Sep 29, 2015 at 9:00
  • Similarly, should I change all ng-... refs to data-ng-..., i.e. ng-include, ng-scope, ng-repeat, etc. ? Sep 29, 2015 at 9:03
  • I changed all ng- refs to data-ng- in all HTML files and still the same problem. Does not work in IE9. (Note. This is not using IFRAME solution.) - thanks for suggestion @DanielZiga Sep 29, 2015 at 9:34

1 Answer 1


I had the same problem (Angular App in SP, which was not working with IE9, but all other browser).

Delete the ng-app="testLabApp" from the html tag and insert a separate div (after body) with ng-app. That was working for me with IE9 in SP.

  • This should do the trick. I've got a provider hosted app (mvc5) and had to put ng-app on <body> element. On <html> element it didn't work.
    – ppatalong
    Jan 5, 2016 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.