- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Setting null values with an HTML
To set null values, here is the controller −
function display($scope) { $scope.obj ={"selected":null}; $scope.objects = [{id: 1, value: "Yes"}, {id: 0, value: "No"}] }
The following is the template −
<div ng-controller = "display"> <select ng-model = "obj.selected" ng-options = "value.id as value.value for value in objects"> <option value = "">Unknown</option> </select> <br/> {{obj}} </div>
Advertisements