Home  >  Article  >  Web Front-end  >  Summary of points to note about angularjs controllers

Summary of points to note about angularjs controllers

零下一度
零下一度Original
2017-06-15 10:26:011089browse

The examples in this article describe the communication methods between AngularJS controllers. I share it with you for your reference. The details are as follows: 1. Using the inheritance method of scope. Since the inheritance of scope is based on the prototype inheritance method of js, there are two situations here. When the value above the scope is a basic type , modifying the value on the parent scope will affect the child scope, conversely, modifying the child scope will only affect the value on the child scope, and will not affect the value on the parent scope; if the parent scope needs to be shared with the child scope If there is a value, you need to use the latter one, that is, the value in the scope is an object. Modifications on either side can affect the other side. This is because objects in js are reference types. Basic type function Sandcrawler($scope) { $scope.location = "Mos Eisley North"; $scope.move = functio

1. Detailed explanation of communication methods between AngularJS controllers

Summary of points to note about angularjs controllers

Introduction: Detailed explanation of communication methods between AngularJS controllers

2. Correct communication method of AngularJS controller_AngularJS

Introduction: The controller in AngularJS is a function used to add additional functionality to the scope of the view ($scope). We use it to set the initial state of the scope object. And add custom behavior

3. Detailed explanation of the use of AngularJS controller_AngularJS

Introduction: This article It mainly introduces the use of AngularJS controller in detail. Interested friends can refer to

4. AngularJS controller inherits from another controller_AngularJS

Introduction: This article introduces the relevant content of AngularJS controller inherited from another controller. The editor thinks that the introduction is very good and has reference value. If you are interested, Friends, please refer to it

The above is the detailed content of Summary of points to note about angularjs controllers. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn