all files / app/main/components/material-docs/demo-partials/tooltip/demoBasicUsage/ script.js

12.5% Statements 1/8
0% Branches 0/6
0% Functions 0/3
12.5% Lines 1/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                    
angular.module('tooltipDemo1', ['ngMaterial'])
.controller('AppCtrl', function($scope) {
  $scope.demo = {
    showTooltip : false,
    tipDirection : ''
  };
 
  $scope.demo.delayTooltip = undefined;
  $scope.$watch('demo.delayTooltip',function(val) {
    $scope.demo.delayTooltip = parseInt(val, 10) || 0;
  });
 
  $scope.$watch('demo.tipDirection',function(val) {
    if (val && val.length ) {
      $scope.demo.showTooltip = true;
    }
  })
});