Skip to content

Commit

Permalink
Update docs (single root element in AJAX-loaded templates)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishoo committed Jun 30, 2014
1 parent c36390a commit 06db6de
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
9 changes: 9 additions & 0 deletions doc/web/Window.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
}
</script>

<p class="important">
In order for AJAX-loaded content to be properly compiled through Angular,
the template should define a single root element. Just embed everything
inside a single <code>&lt;div&gt;</code> tag. The “Lorem ipsum” window
contains an angular expression — <code ng-non-bindable>{{hello}}</code>
which is evaluated in the scope defined in controller. Also, the URL of
the template must target the same domain as the containing page.
</p>

<div ng-include src="SHOW_SOURCE"></div>
20 changes: 17 additions & 3 deletions doc/web/loremIpsum.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<div>

<h2>Important:</h2>

<p>
In order for AJAX-loaded content to be properly compiled through Angular,
the template should define a single root element. Just embed everything
inside a single <code>&lt;div&gt;</code> tag.
</p>

<p>
Here's an Angular expression: {{hello}}.
</p>

<hr />

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor
diam, cursus id sodales non, ornare eget arcu. Aenean ullamcorper
Expand All @@ -9,6 +25,4 @@
laoreet nunc gravida, dictum velit.
</p>

<p>
Here's an Angular expression: {{hello}}.
</p>
</div>

0 comments on commit 06db6de

Please sign in to comment.