I\'m creating a personal website where I can keep updating content without having to manipulate the HTML
. I\'m trying to achieve this by simply loading and updating
var myapp=angular.module('mainApp',[]);
myapp.controller('mainController',function($scope,$http){
$scope.content = null;
$http({method: 'GET', url: 'mainContent.json'}).
success(function(data, status, headers, config) {
$scope.contents=data;
}).error(function(data, status, headers, config) {
});
});
Published in Web Server and added Mime type for .json. It worked.