- 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.
推薦閱讀
- Mastering Concurrency Programming with Java 8
- 程序員面試白皮書
- Java EE 6 企業(yè)級應(yīng)用開發(fā)教程
- 架構(gòu)不再難(全5冊)
- Java Web及其框架技術(shù)
- 零基礎(chǔ)學(xué)MQL:基于EA的自動(dòng)化交易編程
- Java設(shè)計(jì)模式及實(shí)踐
- Solr Cookbook(Third Edition)
- 智能搜索和推薦系統(tǒng):原理、算法與應(yīng)用
- TMS320LF240x芯片原理、設(shè)計(jì)及應(yīng)用
- Kotlin開發(fā)教程(全2冊)
- Android驅(qū)動(dòng)開發(fā)權(quán)威指南
- IoT Projects with Bluetooth Low Energy
- Python數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南(全彩)
- Angular Design Patterns