Home
Run >
<html ng-app="yourApp"> <head> <title>My first AngularJS MVC Architecture code</title> <script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"> </script> <script type="text/javascript"> //Creating controller here var app = angular.module('yourApp', []); app.controller('realCustomer', function($scope) { //Creating model here $scope.customer = { 'Name' : 'Jimi', 'Address' : '12-13-283/A1', 'Email' : 'jimi@yahoo.com' } }); </script> </head> <body> <p>Displing model data in view through controller</p> <div ng-controller="realCustomer"> <h3>{{ customer.Name }} </h3> <h3>{{ customer.Address }} </h3> <h3>{{ customer.Email }} </h3> </div> </body> </html>