📜  angularjs 项目中的控制器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:30.945000             🧑  作者: Mango

代码示例2
myApp.controller('ChildController', ['$scope', function($scope) {
  $scope.name = 'Mattie';
}]);
myApp.controller('GrandChildController', ['$scope', function($scope) {
  $scope.timeOfDay = 'evening';
  $scope.name = 'Gingerbread Baby';
}]);