all files / app/main/components/material-docs/demo-partials/whiteframe/demoDirectiveInterpolation/ script.js

11.11% Statements 1/9
0% Branches 0/4
0% Functions 0/3
11.11% Lines 1/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                                  
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;
      };
    });