官术网_书友最值得收藏!

Controllers

Controllers are part of the framework to handle the business logic of the application. They should be used to control the flow of data in an application. The controller is attached to the DOM via the ng-controller directive.

To add some actions to our view, we need to create functions on controllers, the way to do this is by creating functions and adding them to the $scope object.

The controllers cannot be used to carry out DOM manipulations, format data and filter data, it is considered best practice in the AngularJS world.

Usually, the controllers inject the service objects to delegate handling the business logic. We will understand services in the next section.

主站蜘蛛池模板: 酉阳| 外汇| 固镇县| 拜城县| 鹤山市| 金门县| 瓮安县| 武安市| 瑞金市| 翁牛特旗| 车致| 花莲县| 西藏| 宜兰市| 隆子县| 福清市| 徐汇区| 江山市| 隆尧县| 郧西县| 江山市| 铜山县| 革吉县| 丹巴县| 和林格尔县| 措美县| 盐山县| 新营市| 奎屯市| 日喀则市| 江永县| 鹤山市| 固始县| 石门县| 武陟县| 宣恩县| 临城县| 自贡市| 垫江县| 龙江县| 青海省|