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

  • Spring 5.0 By Example
  • Claudio Eduardo de Oliveira
  • 115字
  • 2021-06-24 19:17:38

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.

主站蜘蛛池模板: 隆安县| 宁阳县| 沁水县| 呼图壁县| 福建省| 内乡县| 云安县| 凤山县| 邹平县| 新泰市| 涞水县| 锡林浩特市| 安义县| 佛学| 延川县| 双桥区| 讷河市| 德昌县| 太仓市| 沽源县| 饶平县| 怀柔区| 镇赉县| 麻江县| 门头沟区| 辽中县| 莱州市| 渝北区| 景德镇市| 荔波县| 都匀市| 毕节市| 陆河县| 禄丰县| 杂多县| 永清县| 彩票| 龙陵县| 阿坝| 黄大仙区| 平谷区|