- 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.
推薦閱讀
- HornetQ Messaging Developer’s Guide
- DevOps for Networking
- Java面向?qū)ο筌浖_(kāi)發(fā)
- Apache Spark 2.x Machine Learning Cookbook
- PHP網(wǎng)絡(luò)編程學(xué)習(xí)筆記
- MySQL數(shù)據(jù)庫(kù)管理與開(kāi)發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- Flutter跨平臺(tái)開(kāi)發(fā)入門(mén)與實(shí)戰(zhàn)
- OpenGL Data Visualization Cookbook
- 軟件供應(yīng)鏈安全:源代碼缺陷實(shí)例剖析
- Python Interviews
- Visual Basic程序設(shè)計(jì)(第三版)
- ROS機(jī)器人編程實(shí)戰(zhàn)
- Test-Driven iOS Development with Swift
- MATLAB 2020 GUI程序設(shè)計(jì)從入門(mén)到精通
- Java從入門(mén)到精通(視頻實(shí)戰(zhàn)版)