| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1× | angular.module('whiteframedemoDirectiveInterpolationUsage', ['ngMaterial'])
.controller('DemoCtrl', function($interval) {
this.elevation = 1;
this.showFrame = 3;
this.nextElevation = function() {
if (++this.elevation == 25) {
this.elevation = 1;
}
};
$interval(this.nextElevation.bind(this), 500);
this.toggleFrame = function() {
this.showFrame = this.showFrame == 3 ? -1 : 3;
};
});
|