From 4804c83b7db5770d5d02eea9eea4cc012b4aa524 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 14 Dec 2011 02:55:31 +0100 Subject: docs(compiler): update the compiler docs --- ...dev_guide.compiler.understanding_compiler.ngdoc | 74 ++++++---------------- 1 file changed, 21 insertions(+), 53 deletions(-) (limited to 'docs/content/guide/dev_guide.compiler.understanding_compiler.ngdoc') diff --git a/docs/content/guide/dev_guide.compiler.understanding_compiler.ngdoc b/docs/content/guide/dev_guide.compiler.understanding_compiler.ngdoc index d5678be4..e802aee6 100644 --- a/docs/content/guide/dev_guide.compiler.understanding_compiler.ngdoc +++ b/docs/content/guide/dev_guide.compiler.understanding_compiler.ngdoc @@ -2,59 +2,27 @@ @name Developer Guide: Angular HTML Compiler: Understanding How the Compiler Works @description -Every {@link api/angular.widget widget}, {@link api/angular.directive directive} and {@link -dev_guide.compiler.markup markup} is defined with a compile function, which the angular compiler -executes on each widget or directive it encounters. The compile function optionally returns a link -function. This compilation process happens automatically when the page is loaded when you specify -`ng:app` on the root element of the application. (See {@link dev_guide.bootstrap Initializing Angular}.) - -The compile and link functions are related as follows: - -* **compile function** — Registers a listener for the widget, directive, or markup expression. The -compiler calls this function exactly once. -* **link function** — Sets up the listener registered by the compile function. This function can be -called multiple times, once per cloned DOM element. For example, in the case of the {@link -api/angular.widget.@ng:repeat repeater widget} used in a list element (`