- 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.
推薦閱讀
- Visual C++程序設(shè)計(jì)教程
- Java面向?qū)ο筌浖_(kāi)發(fā)
- Python Network Programming Cookbook(Second Edition)
- 鋒利的SQL(第2版)
- 差分進(jìn)化算法及其高維多目標(biāo)優(yōu)化應(yīng)用
- CouchDB and PHP Web Development Beginner’s Guide
- Oracle BAM 11gR1 Handbook
- 匯編語(yǔ)言程序設(shè)計(jì)(第3版)
- C#程序設(shè)計(jì)
- Raspberry Pi Home Automation with Arduino(Second Edition)
- ExtJS高級(jí)程序設(shè)計(jì)
- 編程與類型系統(tǒng)
- Learning AWS
- Learning Unreal Engine Game Development
- Java程序設(shè)計(jì)實(shí)用教程(第2版)