0.1.2 • Published 8 years ago

angular-calc v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

angular-calc

An OSX-like calculator plugin for AngularJS.

Use

Include three files in your html:

  • calc.min.css
  • calc.min.js
  • calc.tpl.js
<!doctype html>
<html ng-app="Calc">
  <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="index.min.css">
    <link rel="stylesheet" href="../src/calc.min.css">
  </head>
  <body>
    <div ng-controller="RootCtrl">
      <div ez-calc="data"></div>
    </div>
    <script src="../node_modules/angular/angular.min.js"></script>
    <script src="../src/calc.min.js"></script>
    <script src="../src/calc.tpl.js"></script>
    <script>
    angular.module('Calc', ['ez.calc'])
    .controller('RootCtrl', ['$scope', function($scope) {
      $scope.data = {
        result: 0,
        func: ''
      };
    }]);
    </script>
  </body>
</html>

Build

npm install && gulp

Demo