Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
Added .jshintrc file
Browse files Browse the repository at this point in the history
Updated README
Removed unused function from ng-tags-input.js
Added test page
  • Loading branch information
mbenford committed Oct 3, 2013
1 parent 5b0655a commit 2a40e78
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
21 changes: 21 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"noempty": true,
"noarg": true,
"quotmark": "single",
"undef": true,
"eqnull": true,
"globals": {
"angular": true,
"module": true,
"inject": true,
"jQuery": true,
"beforeEach": true,
"describe": true,
"it": true,
"expect": true,
"spyOn": true
}
}
20 changes: 1 addition & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,7 @@ module.exports = function(grunt) {
jshint: {
files: ['Gruntfile.js', '<%= files.js %>', '<%= files.spec %>'],
options: {
curly: true,
eqeqeq: true,
immed: true,
noempty: true,
noarg: true,
quotmark: 'single',
undef: true,
eqnull: true,
globals: {
angular: true,
module: true,
inject: true,
jQuery: true,
beforeEach: true,
describe: true,
it: true,
expect: true,
spyOn: true
}
jshintrc: '.jshintrc'
}
},
karma: {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ngTagsInput
===========
[![Build Status](https://travis-ci.org/mbenford/ngTagsInput.png?branch=master)](https://travis-ci.org/mbenford/ngTagsInput)

Tags input control for AngularJS. Check out the [ngTagsInput website](http://mbenford.github.io/ngTagsInput) for more information.
Tags input directive for AngularJS. Check out the [ngTagsInput website](http://mbenford.github.io/ngTagsInput) for more information.

## Requirements

Expand All @@ -11,7 +11,7 @@ Tags input control for AngularJS. Check out the [ngTagsInput website](http://mbe

## Installing

Download either `ng-tags-input.min.zip` or `ng-tags-input.zip` from the `build` folder and add its content files to your web application. Make sure the JavaScript script is included after the AngularJS script.
Download either `ng-tags-input.min.zip` or `ng-tags-input.zip` from the [Releases page](https://github.com/mbenford/ngTagsInput/releases) and add its content files to your web application. Make sure the JavaScript file is included after the AngularJS script.

## Usage

Expand Down
Binary file modified build/ng-tags-input.min.zip
Binary file not shown.
Binary file modified build/ng-tags-input.zip
Binary file not shown.
4 changes: 0 additions & 4 deletions src/ng-tags-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
*/

angular.module('tags-input', []).directive('tagsInput', function($interpolate) {
function toBool(value, defaultValue) {
return angular.isDefined(value) ? value === 'true' : defaultValue;
}

function loadOptions(scope, attrs) {
function getStr(name, defaultValue) {
return attrs[name] ? $interpolate(attrs[name])(scope.$parent) : defaultValue;
Expand Down
20 changes: 20 additions & 0 deletions test/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>ngTagsInput Test Page</title>
<script type="text/javascript" src="lib/angular.js"></script>
<script type="text/javascript" src="../src/ng-tags-input.js"></script>
<link rel="stylesheet" href="../src/ng-tags-input.css"/>
</head>
<body ng-controller="Ctrl">
<tags-input ng-model="tags" placeholder="{{ placeholder.value }}"></tags-input>

<script type="text/javascript">
angular.module('app', ['tags-input'])
.controller('Ctrl', function($scope) {
$scope.tags = ['some', 'cool', 'tags'];
$scope.placeholder = {value: "New tag" };
});
</script>
</body>
</html>

0 comments on commit 2a40e78

Please sign in to comment.