last day (15 days later) » 

22:03
0
Q: AngularJS select load selected value from within np-repeat

001221Hi I'm using AngularJS to update multiple entities (what you would call pages). These entities have tags which I want users to select via a select dropdown. When I fetch the data for the collection of entities I fetch the tags that have already been selected and store this within an array in that...

You have to make some option as selected when form is run right or you say something
yes i want to get the selected option when the form is run @PareshGami
which option? you have to make selected?
I am trying to access the option selected within this entity.data.selected_tags.effort in the ng-model in the select. entity.data.selected_tags.effort corresponds data that exists in the $scope.tasks
when i am select value you have to fire some event? and pass get clicked value right?
22:03
@PareshGami no, I want to load the load with already selected value
explain here
hello
i have an array of selectable items
$scope.effortTags = [{
category: "5. XS",
id: "94",
value: "01:00:00"
}, {
category: "4. S",
id: "96",
value: "02:00:00"
}, {
category: "3. M",
id: "94",
value: "04:00:00"
}, {
category: "2. L",
id: "94",
value: "07:00:00"
}, {
category: "1. XL",
id: "94",
value: "16:00:00"
}, {
category: "0. XXL",
id: "94",
value: "38:00:00"
}, {
id: "105",
value: "Estimate Required"
}];
this forms my select
now when i fetch some other data which uses this array of selectable items. it may or may not already have a selected value
ok you fill select using ng-repeat
now
22:06
im not sure how i would do it im new to angular
I have a jsfiddle here jsfiddle.net/gutigrewal/mtp0kcdd/6
dont worry man
why textbox is there?
because i'm going to be creating a form to update
can you explain probleM?
if you look at the data there is a matching id and value in the $scope.effortTags and also in $scope.tasks.entity.selected_tags.effort but this is not selected
the matching one is {
id: "105",
value: "Estimate Required"
}]
understabd
22:15
great!
hope you can help
trying

last day (15 days later) »