AngularJS Sample Application

NG Sample Application


var mainApp = angular.module("mainApp", []);

mainApp.controller('studentController', function ($scope) {
    $scope.student = {
        rollNo: 2,
        firstName: "John",
        lastName: "Doe",
        totalMarks: 700,
        fullName: function () {
            var studentObject;
            studentObject = $scope.student;
            return studentObject.firstName + " " + studentObject.lastName;
        }
    };
});
AngularJS Sample Application AngularJS Sample Application Reviewed by Bhaumik Patel on 10:29 AM Rating: 5