Skip to content

Chapter 4 - select-example.html - wrong file on Git - i've appended the right file(i think : )) - thanks for this Great Book and Examples!!! #27

@walterisaword

Description

@walterisaword
<title> Notes App </title>

What are your favorite sports?

With Binding:
Using ng-checked:
Current state: {{sport.selected}}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.js" > 
</script> 
<script type= "text/javascript" > 
    angular.module('notesApp', []) 
    .controller('MainCtrl', [function ()  { 
        var  self  =  this ; 
        self.sports  =  [ 
            {label: 'Basketball', selected: 'YES'},
            {label: 'Cricket', selected: 'NO'},
            {label: 'Soccer', selected: 'NO'},
            {label: 'Swimming', selected: 'YES'}
        ];
    }]); 
</script> 
</body> 

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