Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Commit

Permalink
Readme paragraph about optional animation with ngAnimate
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaturel committed May 31, 2016
1 parent a9b21f4 commit 5dbcf53
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions README.md
Expand Up @@ -109,6 +109,37 @@ angular.module('demoApp', ['weeklyScheduler', 'weeklySchedulerI18N'])
}])
```

### Animation

You can add animation to the weekly scheduler directive easily by importing angular module `ngAnimate`.
Your application could for instance use :

```javascript
angular.module('demoApp', ['ngAnimate', 'weeklyScheduler'])
```

Don't forget to add the angular-animate javascript file to your Single Page App `index.html`.

```
<script src="/vendor/angular-animate/angular-animate.js"></script>
```

Styling can be changed to whatever you like. This is an example of fading-in items entering the DOM :

```css
.schedule-animate {
transition: opacity 200ms ease-out;
}
.schedule-animate.ng-enter, .schedule-animate.ng-hide-remove {
opacity: 0;
}
.schedule-animate.ng-leave, .schedule-animate.ng-hide-add {
display: none;
opacity: 1;
}
```

You should see your scheduler items fading in!
## License

Released under the MIT License. See the [LICENSE][license] file for further details.
Expand Down
2 changes: 1 addition & 1 deletion dist/js/ng-weekly-scheduler.js
Expand Up @@ -718,7 +718,7 @@ angular.module('ng-weekly-scheduler/views/multi-slider.html', []).run(['$templat

angular.module('ng-weekly-scheduler/views/weekly-scheduler.html', []).run(['$templateCache', function($templateCache) {
$templateCache.put('ng-weekly-scheduler/views/weekly-scheduler.html',
'<div class=labels><div class="srow text-right">{{schedulerCtrl.config.labels.month || \'Month\'}}</div><div class="srow text-right">{{schedulerCtrl.config.labels.weekNb || \'Week number\'}}</div><div ng-repeat="item in schedulerCtrl.items" inject></div></div><div class=schedule-area-container><div class=schedule-area><div class="srow timestamps"><monthly-grid class=grid-container></monthly-grid></div><div class="srow timestamps"><weekly-grid class=grid-container></weekly-grid></div><div class=srow ng-repeat="item in schedulerCtrl.items"><weekly-grid class="grid-container striped" no-text></weekly-grid><multi-slider index={{$index}}></multi-slider></div></div></div>');
'<div class=labels><div class="srow text-right">{{schedulerCtrl.config.labels.month || \'Month\'}}</div><div class="srow text-right">{{schedulerCtrl.config.labels.weekNb || \'Week number\'}}</div><div class=schedule-animate ng-repeat="item in schedulerCtrl.items" inject></div></div><div class=schedule-area-container><div class=schedule-area><div class="srow timestamps"><monthly-grid class=grid-container></monthly-grid></div><div class="srow timestamps"><weekly-grid class=grid-container></weekly-grid></div><div class="srow schedule-animate" ng-repeat="item in schedulerCtrl.items"><weekly-grid class="grid-container striped" no-text></weekly-grid><multi-slider index={{$index}}></multi-slider></div></div></div>');
}]);

angular.module('ng-weekly-scheduler/views/weekly-slot.html', []).run(['$templateCache', function($templateCache) {
Expand Down

0 comments on commit 5dbcf53

Please sign in to comment.