Skip to content

0x333333/angular-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular-calc

npm version Bower version

An OSX-like calculator plugin for AngularJS.

alt nodejs_infobox_screenshot

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

http://zp-j.github.io/projects/angular_calc/

About

A simple demo showing how to create an Angular directive as a component

Resources

Stars

Watchers

Forks

Packages

No packages published