jeudi 20 février 2020

Uncaught TypeError: scope.observeChanges is not a function

Hi I am using Ember Javascript Library, I am getting the following error:

Uncaught TypeError: scope.observeChanges is not a function

My Code is as below:

   didInsertElement: function () {
        var scope = this;

        setTimeout(function () {
            var value = Ember.get(scope, 'value');
            var element = $(scope.element);
            var change = function () { Ember.set(scope, 'value', element.val()); }
            element.val(Ember.get(scope, 'value'));
            element.attr('type', 'text');
            element.change(change);
            // element.keypress(change);
            Ember.set(scope, 'loaded', true);
            scope.observeChanges();
            element.inputmask({
                mask: Ember.get(scope, 'mask')
            });

            element.attr('input-format', Ember.get(scope, 'input-format'));
            element.attr('input-filter', Ember.get(scope, 'input-filter'));
            element.attr('input-filter-message', Ember.get(scope, 'input-filter-message'));

        }, 250);
    }

Its not giving me any issues for running the application - but when I use Debugger, I am getting the above mentioned error - what can I do to fix this issue - thank you.




Aucun commentaire:

Enregistrer un commentaire