JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums General Discussions s.startsWith is not a function – Angular Kanban

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #101829
    nar-c
    Member

    Hi,
    I am using angular to use smart.kanban in our project. I have followed same steps as in the document and installed package through npm. When I run that page, I am getting “s.startsWith is not a function” error in console and nothing gets loaded in page. Please find the attached image.
    Note: I am importing KanbanModule inside a lazy loaded module. I am wondering if it is causing any issue to me.
     
    https://ibb.co/MfSLFtK

    #101830
    admin
    Keymaster

    Hi nar-c,
    Could you please share a stackblitz example which demonstrates the reported behavior? From the error it seems that the Kanban module is not loaded.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101848
    nar-c
    Member

    Hi Peter,
    This issue is happening because of one js file used by us.
    I feel this should not happen in any case.
    Our own js file is something like this,
    Array.prototype.collect = function(functor) {
    var result = [];
    for (var i = 0; i < this.length; ++i) {
    var item = this[i];
    result.push(functor(item));
    }
    return result;
    };
    if (typeof Array.prototype.forEach != ‘function’) {
    Array.prototype.forEach = function (callback) {
    for (var i = 0; i < this.length; i++) {
    if (this[i]) {
    callback.apply(this, [this[i], i, this]);
    }
    }
    };
    }
    In order for Kanban to work, I had to remove this reference from the page.

    #101851
    admin
    Keymaster

    Hi nar-c,
    Thanks for the update.
    We use the Javascript native forEach method in our code. If a native function’s behavior is changed, this may result in errors not only in our code.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.