Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
Numbers And Strings
Objects And Array
AngularJS VS JavaScript
Controllers in Files
Load the Library
AngularJS Directives
Repeating Directive
AngularJS Facts
Create Directives
Restrict Directive
Custom Filter
AngularJS Services
AngularJS Service 2
AngularJS Tables
Select Option
Select Option 2
AngularJS Forms
Form Validation
Validation CSS
Validation Example
AngularJS API
AngularJS $http
AngularJS Database
AngularJS HTML DOM
AngularJS Events
Custom Validation
AngularJS Tutorial
AngularJS Introduction
Angular init Directive
AngularJS Expressions 1
AngularJS Applications
AngularJS Expressions 2
Angular CSS Properties
AngularJS JSON
AngularJS Modules
Controller Basic
Add a Directive
Model Directive
Validate Inputs
CSS Classes
Data Binding
AngularJS Controller
AngularJS Scope
Root of Scope
AngularJS Filters
 


  

 
Select Option 2
Question Posted on 20 Apr 2020

Home >> Tutorial >> AngularJS >> Select Option 2


Select Option 2
In previous chapter we have learn bind dropdown list with array. Now we would try binding dropdown list with object. Below is the example of object with key-value pairs:-

$scope.Employees = {
Emp01 : "Adam",
Emp02 : "Tim",
Emp03 : "John"
};

The expression in ng-options is littlebit different for objects.

In below example we have taken an object which have values in key-value like x present as the key and y present as the value.


AngularJS Object Select
One more example where in object we have 3 values as given in below object and

example

$scope.EMployees = {
Emp01 : {EmpName : "Adam", Department : "IT", Skill : "MCA"},
Emp02 : {EmpName : "Tim", Department : "Admin", Skill : "MBA"},
Emp03 : {EmpName : "Bob", Department : "HR", Skill : "MBA"}
};


AngularJS Object Select3





Other Important Questions
Numbers And Strings
Objects And Array
AngularJS VS JavaScript
Controllers in Files
Load the Library







 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |