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">
<head>
<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" />
</head>
<body>
<div class="container body-content" ng-view>
<!-- View content -->
</div>
</body>
</html>
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?
data-
prefix on the angular attributes, so it saysdata-ng-view
instead of justng-view
?