I'm trying to bind id in my controller
obj1["id"] = $scope.editableCourse.Modules[i].id; obj["id"] = $scope.editableCourse.Modules[i].Resourses[j].id; but in run time, got an
error: "Cannot set property 'id' of undefined".
How can I initialize "id" in my controller for the above cases.
Anyone suggest me a solution.
obj1orobjisundefinedtherefor you can't set property on it. Depending on your case you could dovar obj = {}to fix this