aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/ngInclude.js
diff options
context:
space:
mode:
authorMatias Niemelä2013-04-02 19:41:16 -0400
committerIgor Minar2013-04-03 17:40:15 -0700
commit19f1801379104bc1f74fbb9d288f71034ba829c9 (patch)
treeeaf2d28c5056b80669b33478c808df88431d6a4e /src/ng/directive/ngInclude.js
parent303df9dafee4314e5cfbc805f3321f4f4297a41a (diff)
downloadangular.js-19f1801379104bc1f74fbb9d288f71034ba829c9.tar.bz2
docs: add animations into docs and directive examples
Diffstat (limited to 'src/ng/directive/ngInclude.js')
-rw-r--r--src/ng/directive/ngInclude.js43
1 files changed, 40 insertions, 3 deletions
diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js
index a385d00b..45800e75 100644
--- a/src/ng/directive/ngInclude.js
+++ b/src/ng/directive/ngInclude.js
@@ -41,7 +41,9 @@
</select>
url of the template: <tt>{{template.url}}</tt>
<hr/>
- <div ng-include src="template.url"></div>
+ <div class="example-animate-container"
+ ng-include="template.url"
+ ng-animate="{enter: 'example-enter', leave: 'example-leave'}"></div>
</div>
</file>
<file name="script.js">
@@ -53,10 +55,45 @@
}
</file>
<file name="template1.html">
- Content of template1.html
+ <div>Content of template1.html</div>
</file>
<file name="template2.html">
- Content of template2.html
+ <div>Content of template2.html</div>
+ </file>
+ <file name="animations.css">
+ .example-leave-setup,
+ .example-enter-setup {
+ -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ -moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ -ms-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ -o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+ transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
+
+ position:absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ }
+
+ .example-animate-container > * {
+ display:block;
+ padding:10px;
+ }
+
+ .example-enter-setup {
+ top:-50px;
+ }
+ .example-enter-setup.example-enter-start {
+ top:0;
+ }
+
+ .example-leave-setup {
+ top:0;
+ }
+ .example-leave-setup.example-leave-start {
+ top:50px;
+ }
</file>
<file name="scenario.js">
it('should load template1.html', function() {