diff options
Diffstat (limited to 'src/ng/directive/ngInclude.js')
| -rw-r--r-- | src/ng/directive/ngInclude.js | 43 |
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() { |
