- 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.
推薦閱讀
- 數據庫系統原理及MySQL應用教程(第2版)
- Puppet 4 Essentials(Second Edition)
- LaTeX Cookbook
- Docker and Kubernetes for Java Developers
- MATLAB 2020 從入門到精通
- Production Ready OpenStack:Recipes for Successful Environments
- VMware vSphere 6.7虛擬化架構實戰指南
- Java Web基礎與實例教程
- Java EE 7 Development with NetBeans 8
- 網店設計看這本就夠了
- Learn React with TypeScript 3
- 區塊鏈國產化實踐指南:基于Fabric 2.0
- 計算機應用基礎(第二版)
- Julia High Performance(Second Edition)
- Learning D