Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning Dynamic Models #30

Open
Drake24 opened this issue Jun 8, 2016 · 2 comments
Open

Assigning Dynamic Models #30

Drake24 opened this issue Jun 8, 2016 · 2 comments

Comments

@Drake24
Copy link

Drake24 commented Jun 8, 2016

Hi,

I try adding dynamic models but the checkbox just won't work.

Like this one ng-model ="branch[i]"

Where I is any variable that I would want to create.

@sebastianha
Copy link
Owner

Hi,

I just tested it the the examples of the index.html and for me it works.

I set

<checkbox id="checkbox0" ng-model="checkboxModel[i]"></checkbox>
and $scope.i=0;

@Drake24
Copy link
Author

Drake24 commented Jun 10, 2016

Hi Sebastian,

Got it running. I think it was me adding this code on the main checkbox.

ng-change="checkByBranch({{ $employee->BranchId }})

In which I am passing a parameter. It would create an error. Since, the behavior of the main checkbox if checked will select all employees under it and mark it as checked. But I need to get what particular branch ID was it so that it won't check other employees.

[BLUE HEADER MAIN CHECKBOX]

image

I used the $scope.$watch to get the value instead of ng-change. Since adding it will create an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants