Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div ng-controller="MyCtrl">
    <div ng-click="showFull()">{{phone1 | short}}</div>
    <div ng-click="showFull()">{{phone2 | short}}</div>
    <div ng-click="showFull()">{{phone3 | short}}</div>
    <div ng-click="showFull()">{{phone4 | short}}</div>
    <div ng-click="showFull()">{{phone5 | short}}</div>
  </div>
</body>
</html>
 
// function MyCtrl($scope) {
//   $scope.phone1 = 1111111;
//   $scope.phone2 = 2222222;
//   $scope.phone3 = 3333333;
//   $scope.phone4 = 4444444;
//   $scope.phone5 = 5555555;
// }
angular.module("app", [])
.filter("short", function() {
  return function(input) {
    return input.toString().substring(0,3) +"...";
  };
})
.controller("MyCtrl", function($scope) {
  $scope.phone1 = 1111111;
  $scope.phone2 = 2222222;
  $scope.phone3 = 3333333;
  $scope.phone4 = 4444444;
  $scope.phone5 = 5555555;
  
  $scope.showFull = function() {
    ???
  }
})
.directive('phone', function() {
    return {
      restrict: 'A',
      templateUrl: 'my-customer.html'
    };
  });
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers