TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mahesh Reddy
NA
363
17.1k
save one array values to another array using anjularjs
Nov 24 2018 12:15 AM
I have 2 arrays
$scope.taxes=[];
(at taxes i have 1 field named as value)
$scope.subitems=[];
(at subitems i have 1 field named as text)
the values what ever we enter(taxes) that can be saved to (subitems)
values ---> text
after clicking of save function i want to assign text values(taxes) to value field(subitems) subitems
could anybody please suggest me how to assign taxes(text field values) values to subitems(value fiedvalues)
this is what i have wrote
var subitems = [];
for (var i = 0; i < $scope.taxes.length; i++) {
var item = {};
for (var j = 0; j < $scope.taxes[i].length; j++) {
item.text = $scope.taxes[i].Value;
subitems.push(item);
}
}
at save functionality i am assigning taxvalues to subitems value
i don't know whether this is right or wrong
could please any body help me
Code
Reply
Answers (
5
)
How to remove items from the model collection Using C#
.NET CORE is stable ?