.controller('ProfileDetail', function($scope, $http) {
var url = 'profile/?=4';
$http.get(url).success(function (data) {
$scope.data = data;
}).error(function (data, status) {
$scope.response = 'Request failed';
});
});
<div ng-controller="ProfileDetail">
<div>
{{ data }}
/div>
</div>
а если нужна реакция на клик то
.controller('ProfileDetail', function($scope, $http) {
$scope.data = '';
$scope.doThisShit = function(id){
var url = 'profile/?=' + id;
$http.get(url).success(function (data) {
$scope.data = data;
}).error(function (data, status) {
$scope.response = 'Request failed';
});
}
});
<div ng-controller="ProfileDetail">
<div ng-click="doThisShit(4)">
{{ data }}
/div>
</div>