First, the problems encounteredThe problem occurs when using Angularjs nesting Controller. Because each Controller has its corresponding scope (which corresponds to scope, control range), the nesting of Controller means the nesting of scope. What
JavaScript's prototype inheritance is a wonderful thing.Before the discussion on V2ex, programmers who did not OOP JavaScript were the wild programmers. It seems that I belong to the wild.First, the problems encounteredThe problem occurs when you
First, the problems encounteredThe problem occurs when you use AngularJS to nest controllers. Because each controller has its corresponding scope (equivalent scope, control scope), so the controller nesting, also means the scope of nesting. What
in the 12th chapter of the description of variable objects, we already know that the data of an execution context (variables, function declarations, and formal parameters of functions) is stored as attributes in the variable object. We also know
ObjectiveIn the 12th chapter, in the description of variable objects, we already know that the data (variables, function declarations, and function parameters) of an execution context are stored as attributes in the variable object.
We also know
In-depth exploration of the Scope object super tutorial in AngularJS framework, angularjss.pdf
I. Problems EncounteredThe problem occurs when AngularJS is used to nest the Controller. Because each Controller has its corresponding Scope (equivalent
(1) Scope
The scope of a variable is the region of the variable that is defined in the program's source code.
1. The lexical scope is used in JS (lexical scope)
A variable that is not declared within any function (which is also considered global
Create your own AngularJS-scope and Digest (4)Chapter 1 Scope and Digest (4) Combination$applyCall-$applyAsync
Call either in digest or outside$evalAsyncTo delay work, he is actually designed for previous use cases. InsetTimeoutTo call digest
Each programming language, its variables have a certain range of valid, beyond this range, the variable is invalid, which is the scope of the variable. From the point of view of mathematics, it is the field of the independent variable.
Scopes are
JS scope and scope chain details, js scope details
(1) Scope
The scope of a variable is the region of the variable defined in the program source code.
1. lexical scope is used in JS)
Variables not declared in any function (if var is omitted in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.