Monday, 1 September 2014

AngularJS access JSON or GSON object

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
       pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="Script/angular.min.js"></script>
<script>
      
</script>
<title>AngularJS Demo</title>
</head>
<body ng-app>
       <h2>My Contact</h2>
       <div
              ng-init="contacts = [{name:'Moin', phone:'123423424'},
                         {name:'Neamat', phone:'12312313'},
                         {name:'Reha', phone:'87897987'}]">

              <div ng-repeat="contact in contacts">{{contact.name}} -
                     {{contact.phone}}</div>
</body>
</html>

______________________________________________________________________

output


1 comment:

  1. Thank you For tutorials on Testing and the also the other tutorials on Blog are Awosme, It will be Most Usefull For Fresher and Students
    Angularjs Training In Hyderabad

    ReplyDelete