Difference with use of using Select as in ng-options
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Select box in IE is causing a problem in the opening for the first time when used with
identity as identity.identityName for identity in identityProofList track by identity.identityId
or ng-repeat
but when used without identity as
, it is working fine and can not see any difference in the functionality of select box also.
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)" ng-options="identity.identityName for identity in identityProofList track by identity.identityId" id="identityProofList" >
Where identityProofList is array of objects having properties identityName and identityId.
What is difference b/w the both?
Why
ng-repeat
is causing problem with IE11.
angularjs internet-explorer-11 angularjs-ng-options
add a comment |
Select box in IE is causing a problem in the opening for the first time when used with
identity as identity.identityName for identity in identityProofList track by identity.identityId
or ng-repeat
but when used without identity as
, it is working fine and can not see any difference in the functionality of select box also.
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)" ng-options="identity.identityName for identity in identityProofList track by identity.identityId" id="identityProofList" >
Where identityProofList is array of objects having properties identityName and identityId.
What is difference b/w the both?
Why
ng-repeat
is causing problem with IE11.
angularjs internet-explorer-11 angularjs-ng-options
Look at IE11 slow / freeze with AngularJS's ng-repeat rendering
– Sudhir Ojha
Jan 3 at 12:02
add a comment |
Select box in IE is causing a problem in the opening for the first time when used with
identity as identity.identityName for identity in identityProofList track by identity.identityId
or ng-repeat
but when used without identity as
, it is working fine and can not see any difference in the functionality of select box also.
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)" ng-options="identity.identityName for identity in identityProofList track by identity.identityId" id="identityProofList" >
Where identityProofList is array of objects having properties identityName and identityId.
What is difference b/w the both?
Why
ng-repeat
is causing problem with IE11.
angularjs internet-explorer-11 angularjs-ng-options
Select box in IE is causing a problem in the opening for the first time when used with
identity as identity.identityName for identity in identityProofList track by identity.identityId
or ng-repeat
but when used without identity as
, it is working fine and can not see any difference in the functionality of select box also.
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)" ng-options="identity.identityName for identity in identityProofList track by identity.identityId" id="identityProofList" >
Where identityProofList is array of objects having properties identityName and identityId.
What is difference b/w the both?
Why
ng-repeat
is causing problem with IE11.
angularjs internet-explorer-11 angularjs-ng-options
angularjs internet-explorer-11 angularjs-ng-options
edited Jan 4 at 7:09
Jatin Asija
asked Jan 3 at 10:53
Jatin AsijaJatin Asija
78111
78111
Look at IE11 slow / freeze with AngularJS's ng-repeat rendering
– Sudhir Ojha
Jan 3 at 12:02
add a comment |
Look at IE11 slow / freeze with AngularJS's ng-repeat rendering
– Sudhir Ojha
Jan 3 at 12:02
Look at IE11 slow / freeze with AngularJS's ng-repeat rendering
– Sudhir Ojha
Jan 3 at 12:02
Look at IE11 slow / freeze with AngularJS's ng-repeat rendering
– Sudhir Ojha
Jan 3 at 12:02
add a comment |
1 Answer
1
active
oldest
votes
What is difference b/w the both?
Do you mean the difference between ng-repeat and ng-options?
The difference between using them to create DropdownList is that:
Dropdowns made with ng-options allows the selected value to be an object, while dropdowns made from ng-repeat has to be a string.
More details, check the AngularJS Select Boxes.
Why ng-repeat is causing problem with IE11 is also with using .
According to your codes, I create a sample using the following code, it works well on my IE browser (11.17134.1.0), you could refer to it.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Select a identity:</p>
<select ng-model="selectedidentity">
<option ng-repeat="x in identityProofList " value="{{x.identityId}}">{{x.identityName}}</option>
</select>
<h1>You selected: {{selectedidentity}}</h1><br />
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)"
ng-options="identity as identity.identityName for identity in identityProofList track by identity.identityId"
id="identityProofList"></select>
<h1>You selected: {{selectedvalue}}</h1>
</div>
<script>
var app = angular.module('myApp', );
app.controller('myCtrl', function ($scope) {
$scope.identityProofList = [
{ identityId: "1001", identityName: "Admin" },
{ identityId: "1002", identityName: "User" },
{ identityId: "1003", identityName: "Customer" }
];
$scope.selectedvalue = "";
$scope.changeProofOfIdentity = function (identity) {
$scope.selectedvalue = identity.identityName;
}
});
</script>
The result like this.
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.identity as identity.identityName for identity in identityProofList track by identity.identityId
&identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both
– Jatin Asija
Jan 4 at 7:24
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020890%2fdifference-with-use-of-using-select-as-in-ng-options%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
What is difference b/w the both?
Do you mean the difference between ng-repeat and ng-options?
The difference between using them to create DropdownList is that:
Dropdowns made with ng-options allows the selected value to be an object, while dropdowns made from ng-repeat has to be a string.
More details, check the AngularJS Select Boxes.
Why ng-repeat is causing problem with IE11 is also with using .
According to your codes, I create a sample using the following code, it works well on my IE browser (11.17134.1.0), you could refer to it.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Select a identity:</p>
<select ng-model="selectedidentity">
<option ng-repeat="x in identityProofList " value="{{x.identityId}}">{{x.identityName}}</option>
</select>
<h1>You selected: {{selectedidentity}}</h1><br />
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)"
ng-options="identity as identity.identityName for identity in identityProofList track by identity.identityId"
id="identityProofList"></select>
<h1>You selected: {{selectedvalue}}</h1>
</div>
<script>
var app = angular.module('myApp', );
app.controller('myCtrl', function ($scope) {
$scope.identityProofList = [
{ identityId: "1001", identityName: "Admin" },
{ identityId: "1002", identityName: "User" },
{ identityId: "1003", identityName: "Customer" }
];
$scope.selectedvalue = "";
$scope.changeProofOfIdentity = function (identity) {
$scope.selectedvalue = identity.identityName;
}
});
</script>
The result like this.
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.identity as identity.identityName for identity in identityProofList track by identity.identityId
&identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both
– Jatin Asija
Jan 4 at 7:24
add a comment |
What is difference b/w the both?
Do you mean the difference between ng-repeat and ng-options?
The difference between using them to create DropdownList is that:
Dropdowns made with ng-options allows the selected value to be an object, while dropdowns made from ng-repeat has to be a string.
More details, check the AngularJS Select Boxes.
Why ng-repeat is causing problem with IE11 is also with using .
According to your codes, I create a sample using the following code, it works well on my IE browser (11.17134.1.0), you could refer to it.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Select a identity:</p>
<select ng-model="selectedidentity">
<option ng-repeat="x in identityProofList " value="{{x.identityId}}">{{x.identityName}}</option>
</select>
<h1>You selected: {{selectedidentity}}</h1><br />
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)"
ng-options="identity as identity.identityName for identity in identityProofList track by identity.identityId"
id="identityProofList"></select>
<h1>You selected: {{selectedvalue}}</h1>
</div>
<script>
var app = angular.module('myApp', );
app.controller('myCtrl', function ($scope) {
$scope.identityProofList = [
{ identityId: "1001", identityName: "Admin" },
{ identityId: "1002", identityName: "User" },
{ identityId: "1003", identityName: "Customer" }
];
$scope.selectedvalue = "";
$scope.changeProofOfIdentity = function (identity) {
$scope.selectedvalue = identity.identityName;
}
});
</script>
The result like this.
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.identity as identity.identityName for identity in identityProofList track by identity.identityId
&identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both
– Jatin Asija
Jan 4 at 7:24
add a comment |
What is difference b/w the both?
Do you mean the difference between ng-repeat and ng-options?
The difference between using them to create DropdownList is that:
Dropdowns made with ng-options allows the selected value to be an object, while dropdowns made from ng-repeat has to be a string.
More details, check the AngularJS Select Boxes.
Why ng-repeat is causing problem with IE11 is also with using .
According to your codes, I create a sample using the following code, it works well on my IE browser (11.17134.1.0), you could refer to it.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Select a identity:</p>
<select ng-model="selectedidentity">
<option ng-repeat="x in identityProofList " value="{{x.identityId}}">{{x.identityName}}</option>
</select>
<h1>You selected: {{selectedidentity}}</h1><br />
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)"
ng-options="identity as identity.identityName for identity in identityProofList track by identity.identityId"
id="identityProofList"></select>
<h1>You selected: {{selectedvalue}}</h1>
</div>
<script>
var app = angular.module('myApp', );
app.controller('myCtrl', function ($scope) {
$scope.identityProofList = [
{ identityId: "1001", identityName: "Admin" },
{ identityId: "1002", identityName: "User" },
{ identityId: "1003", identityName: "Customer" }
];
$scope.selectedvalue = "";
$scope.changeProofOfIdentity = function (identity) {
$scope.selectedvalue = identity.identityName;
}
});
</script>
The result like this.
What is difference b/w the both?
Do you mean the difference between ng-repeat and ng-options?
The difference between using them to create DropdownList is that:
Dropdowns made with ng-options allows the selected value to be an object, while dropdowns made from ng-repeat has to be a string.
More details, check the AngularJS Select Boxes.
Why ng-repeat is causing problem with IE11 is also with using .
According to your codes, I create a sample using the following code, it works well on my IE browser (11.17134.1.0), you could refer to it.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Select a identity:</p>
<select ng-model="selectedidentity">
<option ng-repeat="x in identityProofList " value="{{x.identityId}}">{{x.identityName}}</option>
</select>
<h1>You selected: {{selectedidentity}}</h1><br />
<select name="identityProof" ng-model="identityProof" ng-change="changeProofOfIdentity(identityProof)"
ng-options="identity as identity.identityName for identity in identityProofList track by identity.identityId"
id="identityProofList"></select>
<h1>You selected: {{selectedvalue}}</h1>
</div>
<script>
var app = angular.module('myApp', );
app.controller('myCtrl', function ($scope) {
$scope.identityProofList = [
{ identityId: "1001", identityName: "Admin" },
{ identityId: "1002", identityName: "User" },
{ identityId: "1003", identityName: "Customer" }
];
$scope.selectedvalue = "";
$scope.changeProofOfIdentity = function (identity) {
$scope.selectedvalue = identity.identityName;
}
});
</script>
The result like this.
answered Jan 4 at 6:51
Zhi Lv - MSFTZhi Lv - MSFT
848135
848135
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.identity as identity.identityName for identity in identityProofList track by identity.identityId
&identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both
– Jatin Asija
Jan 4 at 7:24
add a comment |
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.identity as identity.identityName for identity in identityProofList track by identity.identityId
&identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both
– Jatin Asija
Jan 4 at 7:24
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.
identity as identity.identityName for identity in identityProofList track by identity.identityId
& identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both– Jatin Asija
Jan 4 at 7:24
Thanks for your answer but I was asking for difference b/w using 'select as' syntax and without it because the latter one is working fine with IE and former one is not i.e.
identity as identity.identityName for identity in identityProofList track by identity.identityId
& identity.identityName for identity in identityProofList track by identity.identityId
, and ng-repeat is also not working with IE, but I know the difference b/w both– Jatin Asija
Jan 4 at 7:24
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020890%2fdifference-with-use-of-using-select-as-in-ng-options%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Look at IE11 slow / freeze with AngularJS's ng-repeat rendering
– Sudhir Ojha
Jan 3 at 12:02