jeudi 16 juin 2016

AngularJS Checkbox Value

I need a value assigned to my checkboxes. When the box gets checked it gives me an undefined value. Please let me know what is wrong in my code:

$scope.days = [
            {
                day: '0',
                name: 'Sunday'
            },
            {
                day: '1',
                name: 'Monday'
            },
            {
                day: '2',
                name: 'Tuesday'
            },
            {
                day: '3',
                name: 'Wednesday'
            },
            {
                day: '4',
                name: 'Thursday'
            },
            {
                day: '5',
                name: 'Friday'
            },
            {
                day: '6',
                name: 'Saturday'

HTML

Sorry I had to include a screenshot of the html code as the formatting is not working here.

I need the checkbox value to equal to days.day.

Thanks for your help.




Aucun commentaire:

Enregistrer un commentaire