Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular delete from array by name

deleteMsg(msg:string) {
    const index: number = this.data.indexOf(msg);
    if (index !== -1) {
        this.data.splice(index, 1);
    }        
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #angular #delete #array
ADD COMMENT
Topic
Name
8+6 =