4.2 aad
studentController.js
mainApp.controller("studCtrl", function($scope){
$scope.student = { fname: "Satish", lname: "Vishwakarma", fees: 150,
subjects:[
{name:"Advance app devloipment", marks:80},
{name:"Advance app devloipment", marks:80},
{name:"Advance app devloipment", marks:80},
{name:"Advance app devloipment", marks:80},
{name:"Advance app devloipment", marks:80},
{name:"Advance app devloipment", marks:80},
{name:"Advance app devloipment", marks:80},
],
fullName: function(){
var stud = $scope.student;
return stud.fname + " " + stud.lname;
}
};
});
mainApp.js
var mainApp = angular.module("mainApp", []);
No comments