day67—angularJS学习笔记控制器


转行学开发,代码100天——2018-05-22

angularJS通过控制器来控制数据流的应用。

ng-controller。

控制器中包含属性和函数,其参数引用通过 $scope来执行。

如下文的控制器

ng-controller="control"



    angularJS 控制器
    
    


    
Enter first name:
Enter last name :
You are enter:{{student.fullName()}}
$scope.student是control控制器的对象属性,
firstName和lastName是$scope.student的属性,而fullName是
$scope.student对象的函数,用于返回合成后的姓名。