Error on vue function

  • Hi SPQRInc I have a question for you.

    Code
    1. <button class="uk-button uk-button-danger" @click="remove(posts.id)" v-if="!posts.status">
    2.     <i class="uk-icon uk-icon-close"></i>
    3. </button>
    Code
    1.         methods: {
    2. remove: function(event){
    3. this.$http.post('admin/simple/remove', { tester: event }, function() {
    4. UIkit.notify(vm.$trans('Saved.'), '');
    5. }).error(function(data) {
    6. UIkit.notify('Error Out', 'danger');
    7. });
    8. }
    9. }
    Code
    1. /**
    2. * @Request({"tester": "int"}, csrf=true)
    3. * @Access(admin=true)
    4. */
    5. public function removeAction($tester = null)
    6. {
    7. return ['message' => 'success'];
    8. }



    But, When I clicked on the button. OUTPUT// Error Out so. .error(function) trying. Why? simple/remove function so removeAction() have a function. How to remove post?

  • Okey thanks :)


    Code
    1. this.$http.post('admin/simple/remove', { entries: this.post }, function() {
    2. UIkit.notify('Saved.', '');
    3. }).catch(function(data) {
    4. UIkit.notify('Hata Var', 'danger');
    5. });

    .error change .catch

  • So there is no information at all. The console shows only: Warning/Error: .error change .catch ? Did not see that before.


    I did the same just like this:


    Code
    1. save: function () {
    2. this.$http.post('admin/my-extension/save', {config: this.config}, function () {
    3. this.$notify('Settings saved.');
    4. }).error(function (data) {
    5. this.$notify(data, 'danger');
    6. });
    7. }


    and this is working fine. So there is no further information? Syntax error, unresolved promise...? Something like a line number? Could you activate debug mode?

  • I'm always using