The data posted this way around seems (mostly) correct. I just need to
figure out how to edit the JSON files.
I'll probably end up having to do a PHP backend, to match up on top of the
current Magento install, run a few ajax calls to php docs and make them do
the saving of the data. This would also allow me to do direct integration
into Magento, on a push notification from the system.
I do need to find out how to get my scope to inherit the "inside" scope
though, as I have an options scope building input fields for changing
values of dropdowns inside the code.
label(ng-repeat="Options in att.type.options")
input(type="hidden" ng-value="$index+1")
input(ng-value="Options.value")
the plan is to be able to add/remove these fields, and store this info in
the JSON file together with the original pull, but it doesn't seem to be
included.
On Tuesday, November 11, 2014 10:13:30 AM UTC+1, Kasper Hansen wrote:
>
> $scope.save = function() {
> $http({
> method: 'POST',
> header: {'Content-Type': 'application/x-www-form-urlencoded'},
> url: './assets/json/attributes.json',
> data: $scope.attr,
>
> })
>
> Should I not be able to push data into a JSON file? Granted, I cannot
> create a new file, but updating data in an existing one, is not possible
> either?
>
> On Monday, November 10, 2014 4:32:11 PM UTC+1, Sander Elias wrote:
>>
>> Hi Kasper,
>>
>> You need to handle the saving part on the server side. Angular is pure
>> front-end.
>> Can you show me the code you use to send the data back to the server,
>> perhaps I can then help you.
>>
>> Regards
>> Sander
>>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.