0

I am trying to create a list of contacts, where I have two views.
One view that lists all the contacts and gives the option to add a new contact, being a button, not an actual space where I put the information.
The other views is when I click on the plus sign, that would give me the field to put a new information.
What I am trying to do is using angular, after I put all the information in the field, have updated on the array. My idea is that since I am not refreshing the page, the array should contain the new added contact, but it's not happening.
Do you guys know why?
I could put the code here, but honestly I just want to know if what I am trying to do is hypothetically possible


Edit: Everything was fixed using a factory ;). Thank you guys.

Renan Cidale
  • 842
  • 2
  • 10
  • 23

1 Answers1

0

If I get you correctly I think what you need is a service to hold the contacts, that way if you update the service your scope property for the contacts updates as well

Okolie Solomon
  • 486
  • 7
  • 8