Skip to content

Error in Defining new Exercise (4.7) #17

@abdollahkahne

Description

@abdollahkahne

Because push is only defined for array. when I want to add a video for new exercise it doesnt work and doesnt add ng-form to view.
I corrected it in the model for Exercise Construc function as below:

if (!args.videos) {
                this.related.videos=[];//we should specify type of videos as arrays!
            }

But I am sure there is better way for this. Any suggestion?!
Thanks
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions