I'm trying to create SPA. So in that case I created one mainApp and in that mainController and inside that I called ngInclude with url's and its working fine. Checkout the code below
<html>
<head>
<script type="text/javascript" src="angular.min.js" ></script>
<script type="text/javascript" src="application_nestedApps.js" ></script>
</head>
<body ng-app="mainApp">
<div ng-controller = "mainController">
<div ng-include="currentPage"></div>
</div>
</body>
</html>
JSCODE :
var mainApp = angular.module('mainApp', []);
mainApp.controller('mainController',['$scope',function($scope){
$scope.currentPage = "**someURL**";
// This requestPage function called on page link clicked
$scope.requestPage = function(requestedURL){
console.log(requestedURL);
$scope.currentPage = requestedURL;
}
}]);
Now the issue is when I'm going to request static resources via URL in that case everything is working fine... but in that case i'm not able to request some angular resource because it not loaded and shows me error...
Anyone please tell me what should I do in that case... I just asked one question on Nested App inside controller in angularJS which is related to that problem...
let me know to change the approach or need some tricks in existing code...