From ee8db6f9ab5425ea015977debc6e18a947f091a8 Mon Sep 17 00:00:00 2001 From: Shai Reznik Date: Tue, 18 Feb 2014 01:45:30 +0200 Subject: [PATCH] Update compiler.ngdoc The $compile service accepts string as a value and wraps it if needed, so this statement isn't correct, at least by the source code. --- docs/content/guide/compiler.ngdoc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/content/guide/compiler.ngdoc b/docs/content/guide/compiler.ngdoc index 0a869a10d313..631e4b9bd1af 100644 --- a/docs/content/guide/compiler.ngdoc +++ b/docs/content/guide/compiler.ngdoc @@ -158,10 +158,6 @@ by template data merge. It's important to note that Angular operates on DOM nodes rather than strings. Usually, you don't notice this restriction because when a page loads, the web browser parses HTML into the DOM automatically. -However it's important to keep this in mind when calling `$compile` yourself, because passing it a string -will fail. Instead, use `angular.element` to convert a string to DOM before passing elements into -Angular's `$compile` service. - HTML compilation happens in three phases: 1. {@link ng.$compile `$compile`} traverses the DOM and matches directives.