I have a index.html file and another topBar.html file and I want to include that file in my index.html.
My directory structure is like below:
mainfolder/
scripts/
views/
topBar.html
index.html
Here is the code that I tried
<div ng-controller="mainCtrl">
<div ng-include="'views/topBar.html'"></div>
</div>
But nothing is being displayed and it gives me error in the console
angular.js:12701 Failed to load file:'path' Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.