Skip to content

Commit

Permalink
Merge pull request #43 from dwmkerr/d/Gulp
Browse files Browse the repository at this point in the history
Moved to gulp.
  • Loading branch information
dwmkerr committed Feb 27, 2015
2 parents 790d404 + 7b0d1dd commit b0b08d7
Show file tree
Hide file tree
Showing 30 changed files with 45,230 additions and 104 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: node_js
node_js:
- '0.10'
before_script:
- 'npm install -g grunt-cli'
- 'npm install -g bower'
- 'bower install'
after_script:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.7

* Moved from grunt to gulp.

## v0.6

## v0.5

* Updated the dependencies to use AngularJS 1.3 and upwards.
Expand Down
69 changes: 0 additions & 69 deletions Gruntfile.js

This file was deleted.

25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ for a bootstrap modal:
```js
app.controller('SampleModalController', function($scope, close) {

$scope.close = function(result) {
$scope.dismissModal = function(result) {
close(result, 200); // close, but give 200ms for bootstrap to animate
};

Expand All @@ -90,18 +90,37 @@ should be closed and that's it. Quick hint - if you are using Bootstrap for your
then make sure the modal template only contains one root level element, see the [FAQ](#faq)
for the gritty details of why.

To pass data into the modal controller, use the `inputs` field of the modal options. For example:

```js
ModalService.showModal({
templateUrl: "exampletemplate.html",
controller: "ExampleController",
inputs: {
name: "Fry",
year: 3001
}
})
```

injects the `name` and `year` values into the controller:

```js
app.controler('ExampleController', function($scope, name, year, close) {
});

#### ShowModal Options

The `showModal` function takes an object with these fields:

* `controller`: The name of the controller to created.
* `controllerAs` : The name of the variable on the scope the controller is assigned to - (optional)
* `controllerAs` : The name of the variable on the scope the controller is assigned to - (optional).
* `templateUrl`: The URL of the HTML template to use for the modal.
* `template`: If `templateUrl` is not specified, you can specify `template` as raw
HTML for the modal.
* `inputs`: A set of values to pass as inputs to the controller. Each value provided
is injected into the controller constructor.
* `appendElement`: The custom angular element to append the modal to instead of default body.
* `appendElement`: The custom angular element to append the modal to instead of default `body` element.

#### The Modal Object

Expand Down
12 changes: 8 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-modal-service",
"version": "0.6.0",
"version": "0.7.0",
"homepage": "https://github.com/dwmkerr/angular-modal-service",
"authors": [
"Dave Kerr (github.com/dwmkerr)"
Expand All @@ -24,15 +24,19 @@
"src",
".gitignore",
"*.json",
"server.js",
"Gruntfile.js",
"gulpfile.js",
"CHANGELOG.md",
"*.yml"
],
"dependencies": {
"angular": "~1.3.x"
"angular": "~1.3.x",
"bootstrap": "~3.3.2",
"jquery": "~2.1.3"
},
"devDependencies": {
"angular-mocks": "~1.3.x"
},
"resolutions": {
"angular": "~1.3.x"
}
}
4 changes: 2 additions & 2 deletions dst/angular-modal-service.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dst/angular-modal-service.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b0b08d7

Please sign in to comment.