ksa,
подскажи пожалуйста по подробнее, я только начала разбиратся в ангуляре. Вот код моего контроллера
noteApp.controller('NoteIdController',
function ($location, $route, $scope, $http, $routeParams, NoteIdService, CommentIdService, LabelService) {
//console.log($location);
NoteIdService.get({pk: $route.current.params.pk}, function (result) {
$scope.note = result;
// console.log(result);
});
//console.log($route.current.params.pk)
CommentIdService.query({pk: $route.current.params.pk}, function (result) {
// console.log(result);
$scope.comment = result;
// console.log("dgfdgf");
// console.log(result);
});
console.log('scope');
$scope.submitComment = function(){
console.log($scope.note.pk);
var data= {content: $scope.selected_content,
note_comment:$scope.note.pk,
}
console.log(data)
$http({
method: 'POST',
url: '/api/comment/',
data: data,
headers: {'Content-Type': 'application/json;charset=utf-8'}
});
};
});