If you want to see angular Code for , I'll show you this first , Situ's dry goods .

/*********************************************************************
* Depending on the scheduling system *
**********************************************************************/
var ronduplex = /^(duplex|on)$/ function registerSubscriber(data) {
Registry[expose] = data // Expose this function , convenient collectSubscribers collect
avalon.openComputedCollect = true
var fn = data.evaluator
if (fn) { // If it's an evaluation function
try {
var c = ronduplex.test(data.type) ? data : fn.apply(0, data.args)
data.handler(c, data.element, data)
} catch (e) {
log("warning:exception throwed in [registerSubscriber] " + e)
delete data.evaluator
var node = data.element
if (node.nodeType === 3) {
var parent = node.parentNode
if (kernel.commentInterpolate) {
parent.replaceChild(DOC.createComment(data.value), node)
} else {
node.data = openTag + data.value + closeTag
}
}
}
}
avalon.openComputedCollect = false
delete Registry[expose]
} function collectSubscribers(list) { // Collect subscribers that depend on this accessor
var data = Registry[expose]
if (list && data && avalon.Array.ensure(list, data) && data.element) { // Only if this element does not exist in the array push go in
addSubscribers(data, list)
}
} function addSubscribers(data, list) {
data.$uuid = data.$uuid || generateID()
list.$uuid = list.$uuid || generateID()
var obj = {
data: data,
list: list,
toString: function() {
return data.$uuid + " " + list.$uuid
}
}
if (!$$subscribers[obj]) {
$$subscribers[obj] = 1
$$subscribers.push(obj)
}
}
var $$subscribers = [],
$startIndex = 0,
$maxIndex = 200,
beginTime = new Date(),
removeID function removeSubscribers() {
for (var i = $startIndex, n = $startIndex + $maxIndex; i < n; i++) {
var obj = $$subscribers[i]
if (!obj) {
break
}
var data = obj.data
var el = data.element
var remove = el === null ? 1 : (el.nodeType === 1 ? typeof el.sourceIndex === "number" ?
el.sourceIndex === 0 : !root.contains(el) : !avalon.contains(root, el))
if (remove) { // If it's not in DOM Trees
$$subscribers.splice(i, 1)
delete $$subscribers[obj]
avalon.Array.remove(obj.list, data)
//log("debug: remove " + data.type)
disposeData(data)
obj.data = obj.list = null
i--
n-- }
}
obj = $$subscribers[i]
if (obj) {
$startIndex = n
} else {
$startIndex = 0
}
beginTime = new Date()
}
function disposeData(data) {
data.element = null
data.rollback && data.rollback()
for (var key in data) {
data[key] = null
}
} function notifySubscribers(list) { // Notifies subscribers who depend on this accessor to update themselves
clearTimeout(removeID)
if (new Date() - beginTime > 444) {
removeSubscribers()
} else {
removeID = setTimeout(removeSubscribers, 444)
}
if (list && list.length) {
var args = aslice.call(arguments, 1)
for (var i = list.length, fn; fn = list[--i]; ) {
var el = fn.element
if (el && el.parentNode) {
if (fn.$repeat) {
fn.handler.apply(fn, args) // How to deal with monitor arrays
} else if (fn.type !== "on") { // Event binding can only be triggered by the user , Cannot be triggered by a program
var fun = fn.evaluator || noop
fn.handler(fun.apply(0, fn.args || []), el, fn)
}
}
}
}
}

Write and read ng The basics before ---- More articles about notes

  1. JS Basic knowledge notes

    2020-04-15 JS Basic knowledge notes // new Boolean() The value passed in is the same as if The judgment is the same var test=new Boolean(); console.log(test); // false ...

  2. Java Multithreading basics notes ( Continuous updating )

    Multithreading basics notes One . Threads 1. Basic concepts Program (program): To accomplish a specific task . A collection of instructions written in a language . That is, a piece of static code , Static objects . process (process): It's an execution of the program , or ...

  3. JavaScript Basic knowledge notes

    I've been at the front end for a few years , I've been neglecting to summarize , So I've looked at the foundation over the past two days , Plus experience , The key technologies of basic knowledge are sorted out , It aims at systematic learning and notes . If an error is found , Please leave a message , thank you ! Important note : This article only lists the basic knowledge points , Intermediate and advanced inside ...

  4. javascript Basic knowledge notes - Self use

    The content of the notes is based on the lack of personal basic knowledge . The main thing to watch :https://developer.mozilla.org/zh-CN/docs/Web/JavaScript 1. Variable , The name of a variable is also called an identifier ...

  5. java Basic knowledge of - Take notes

    1. View installed jdk File path CMD Input java -verbose.   2.java Learn the path to improvement java Learn the video address : http://www.icoolxue.com/album/show/38 ...

  6. Java Basic knowledge notes ( 3、 ... and : Files and data streams )

    One . Input stream and output stream The input stream takes the data from the file . Standard input or other external input device loaded into memory . The effect of output flow is just the opposite , Save the data in memory to a file , Or to the output device . The input stream is Java Language corresponds to abstract class java.i ...

  7. Javascript Basic knowledge notes

    label ( The blank space to separate ): Mr. Liao's study notes javascript Basic entry According to Mr. Liao Xuefeng's official website , Simple notes after reading by yourself The first section Basic knowledge <script type="text/javascrip ...

  8. Oracle Basic knowledge notes (10) constraint

    Even though the table is set up , However, whether the data in the table is legal cannot be checked , And suppose you want to do some filtering for the data in the table , Then it can be completed by constraints , The main function of constraints is to ensure the validity of the data in the table , According to the classification of constraints , There are five constraints : Non empty constraint ...

  9. html Basic knowledge notes

    HTML Basics 1.1HTML The basic structure of the document and W3C standard 1.1.1HTML brief introduction HTML It's a language for describing web pages , A hypertext markup language ! 1.1.2HTML The basic structure of the document Head (head) The header is the logo of the web page ...

Random recommendation

  1. stay C# Read the description property of the enumeration value in

    enumeration : public enum EnumLanugage { [System.ComponentModel.Description(" chinese ")] Chinese, English ...

  2. Single instance implementation c++

    #include <iostream> using namespace std; class Singleton { public: static Singleton *GetInstan ...

  3. Linux Commonly used instructions --- System management

    Four .linux The server " [have no space]" Development machine dev2 It doesn't matter upa/upc When uploading files , It will be attached to / Under the table of contents , And at this point, it's just 3G Space , adopt df -h Display the usage of major mount points ...

  4. Lethal thunder dog ThinkPHP Project ---- Corporate website 13 Implementation of article list page ( Mainly is the pagination realization )

    The list page is actually a relatively simple one , Just traverse the division data directly : public function lists(){ //$mod = M("Article")->select(); // ...

  5. or1200 Next raw-os Study ( Mission )

    This time, let's talk about how to build the tasks we need based on the system diagram introduced in the previous section , By the way Raw-OS Provided API, According to the analysis in the previous section , about Slave Board There are the following designs : Slave Board There are three tasks , They are responsible for testing the impedance respectively ...

  6. Through Baidu map API location -- Third party open source -- Baidu Maps ( One )

    1. Positioning Baidu map API( Download address :http://lbsyun.baidu.com/sdk/download?selected=location) Inside libs Copy to your own project libs Inside 2. Progressive phase ...

  7. ASP.NET Web - Send back

    If you want to send the change event to the server immediately , You can put AutoPostback Property is set to true. This will use the client's JavaScript Submit the form data to the server immediately . Of course , Network traffic will also increase . Be careful when using this function ...

  8. Html.Action and Html.RederAction To create a subview

    1. Parent view and child view A parent view is a view that contains calls to action methods that return child views . The parent view contains most of the HTML. Subviews contain only the necessary tags to display a part of the view . for example , A subview creates a list , The view might just be a package ...

  9. JavaScript Examples and techniques (12)— Calculate constellations and zodiacs

    >> Click here to download the complete html Source code << This is a screenshot : The core code is as follows : <SCRIPT LANGUAGE="JavaScript"> <!-- ...

  10. Centos 7.0 execute yum update ——File &quot;/usr/libexec/urlgrabber-ext-down&quot;, line 75, in &lt;module&gt; Solution

    [ Open this file :/usr/lib/python2.7/site-packages/urlgrabber/grabber.py find elif errcode in (42, 55,56)   use  eli ...