Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
angular-eha.date-of-birth-or-age
Advanced tools
Date of birth & Age features
Demo.
Install with npm:
npm install --save angular-eha.date-of-birth-or-age
Or alternatively bower:
bower install --save angular-eha.date-of-birth-or-age
Then simply add eha.date-of-birth-or-age
as dependencies somewhere in your project that makes sense and you're good to go.
If you're using wiredep dist/date-of-birth-or-age.template.js
will be injected by default. If you don't want that to happen you'll like want to employ something along the following lines in your Gruntfile
:
wiredep: {
...
options: {
exclude: [
'bower_components/date-of-birth-or-age/dist/date-of-birth-or-age.template.js'
]
}
...
}
Then you're free to include whichever bundle you prefer in what ever manner you prefer.
<html ng-app="dobExample">
<head>
<title>Back Button Example</title>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-eha.date-of-birth-or-age/dist/date-of-birth-or-age.template.js"></script>
<script>
var app = angular.module('dobExample', [
'eha.date-of-birth-or-age'
]);
app.controller('MyCtrl', function($scope) {
$scope.person = {
birthYear: '',
birthMonth: '',
birthDay: '',
age: {
years: '',
months: ''
}
}
});
</script>
</head>
<body>
<div ng-controller="MyCtrl">
<eha-date-of-birth-or-age model="person"></eha-date-of-birth-or-age>
</div>
</body>
</html>
# Fork the upstream repo on github and pull down your fork
git clone git@github.com:yourusername/angular-eha.date-of-birth-or-age.git
# change into project folder
cd angular-eha.date-of-birth-or-age
# Add the upstream as a remote
git remote add upstream git@github.com:eHealthAfrica/angular-eha.date-of-birth-or-age.git
# Install the dev dependencies
npm install
Code should be documented following the guidelines set out by jsdoc and ngdoc. We can then leverage Dgeni or something simlary to generate documentation in any format we like.
The test suite is configured to run in Firefox and is powered by:
The library is conducive to TDD. grunt test:watch
is your friend. As modules (and templates) are exposed on their own namespace you can easily isolate areas of the code base for true unit testing without being forced to pull in the whole library or stub/mock modules irrelevant to the feature(s) you're testing.
grunt test
grunt test:watch
Transpiling our html templates into js allows us to neatly push them into the $templateCache
.
To transpile the templates it's another simple grunt command:
grunt templates
This will compile the templates to the dist/
folder. But it's probably best to avoid this all together. Both the grunt test
and grunt release
commands take care of all of this for you.
If you need to override the default template, simply replace what's already in the $templateCache
with what ever you want. One way to achieve this is like this:
<script id="templates/date-of-birth-or-age.directive.tpl.html" type="text/html">
// Your markup here
</script>
Copyright 2015 Matt Richards matt.richards@ehealthafrica.org
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
Date of Birth or Age directive
The npm package angular-eha.date-of-birth-or-age receives a total of 9 weekly downloads. As such, angular-eha.date-of-birth-or-age popularity was classified as not popular.
We found that angular-eha.date-of-birth-or-age demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.