• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the best way to pass values from back-end to front-end?  RSS feed

 
priyanshi bhardwaj
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to add a delete all function to my app.I am passing the list of id's of field's which needs to be deleted on the basis of certain check's some of the list elements are being removed, rest of all elements are being deleted from the database. Now I want to inform my user that few elements which user has selected are not deleted. How can I do this? I am using angular js as front-end Java and SQL as backend & database.
 
Dave Tolls
Ranch Hand
Posts: 2835
30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
priyanshi bhardwaj wrote:... on the basis of certain check's some of the list elements are being removed, rest of all elements are being deleted from the database. Now I want to inform my user that few elements which user has selected are not deleted.


I would put the removed elements into their own List, of not-deleted elements, and return that to the front end to somehow present to the user.
 
priyanshi bhardwaj
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look I understand but I want to display the user a message that your selected elements failed few checks yet they can not be deleted.Try again
 
priyanshi bhardwaj
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would put the removed elements into their own List, of not-deleted elements, and return that to the front end to somehow present to the user.

I have also made a list of all not deleted elements now how to pass it back to the front end.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using AngularJS presumably you are familiar with how its data binding works. So, as with any other data, you need to update your model view data and bird it to where it will appear in the UI.

Other than that, is there an additional problem that prevents you from using the normal AngularJS mechanisms?
 
priyanshi bhardwaj
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as with any other data, you need to update your model view data

can you please elaborate what you are trying to say? Or any other example would be fine.
Is there an additional problem that prevents you from using the normal AngularJS mechanisms?

not yet but if I'll face any, I'll let you know.Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
priyanshi bhardwaj wrote:
as with any other data, you need to update your model view data

can you please elaborate what you are trying to say? Or any other example would be fine.

You are familiar with how AngularJS data binding works, right?

The data is bound (usually from a $scope, but not always) to the display though the user of AngularJS directives in the market-up HTML. If you are not familiar with how this works that where you need to focus your attention. It is well beyond the scope of a forum post to learn how AngularJS works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!