Set value by ID in ionic View


I have the event page that gathers data from retrieveEvent.php in JSON array as shown below.

{“data”:[ {“link”: “http://localhost/sidemenu/uploads/Events/_Screenshot (19)_1485617270.png”},
{“event”: “First”},
{“date”: “2017-12-31 18:58:00”},
{“info”: “FInally we are here”},
{“Address”: “Room No. 3, 1st Floor Mahavir Krupa, Bldg No. 147,Jain Society, Sion west, Opposite M. P. Bhuta High School, Jay BharatMata Nagar, Sion East, Sion, Mumbai, Maharashtra 400022, India” } ,
{“Name”: “April Innovations” } ,
{“Latlon”: “19.038068 , 72.85971700000005” },
{“link”: “http://localhost/sidemenu/uploads/Events/_Screenshot (33)_1485636870.png”},
{“event”: “Second”},
{“date”: “2017-12-30 23:59:00”},
{“info”: “This is the second one .”},
{“Address”: “New South Wales, Australia” } ,
{“Name”: “New South Wales” },
{“Latlon”: “-31.2532183 , 146.92109900000003” }
Now in my ionic app , I want this event information to be listed. One event contains 5 values i.e. {link, event, info, data, address} as shown in above array. My issue is this .php file updates dynamically as and when the user updates it from one of the .html files. So I want this whole array to be divided in to 5 values that should be display as a list to the user.

i.e. Event 1 = first 5 values of array , event 2= next 5 values of array. I somehow manage to display single event , i want to display multiple event.

I tried with javascript getElementById, but i get the error:

angular.min.js:249 WARNING: Tried to load angular more than once. ionic.bundle.js:26799 TypeError: Cannot read property ‘innerHTML’ of null
event.html (ionic app page)

    var data = $scope.new_data[0].link;
    var i;
    var temp = angular.element(document.getElementById("name")) ;
    temp.value =  data ;    

This returns the value to the console, but n

ot on events.html page.


Looks like there is no name field/element in your page. Can you share your events.html code