<div ng-app="myApp" ng-controller="personCtrl">
姓:{{fName}} //绑定属性
姓名: {{fullName()}} //绑定方法,方法有返回值
</div>
<script>
var app = angular.module('myApp', []);
app.controller('personCtrl', function($scope) {
$scope.fName='carry';
$scope.fullName = function() {
return $scope.firstName + " " + $scope.lastName;
}
});
</script>