Skip to content

Commit

Permalink
Added README
Browse files Browse the repository at this point in the history
  • Loading branch information
hmartos committed Apr 15, 2017
1 parent 8ce112e commit ca32520
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ angular-reservation
AngularJS configurable module to set up an appointment on a calendar. It can be used to make a reservation in a restaurant, clinic, barber shop, or any kind
of service provided in time slots.

#[See the DEMO](https://hmartos.github.io/angular-reservation/)
# [See the DEMO](https://hmartos.github.io/angular-reservation/)

## Requirements

Expand All @@ -18,56 +18,56 @@ of service provided in time slots.
### Load scripts
Load AngularJS, dependencies script files and the script file angular-reservation.min.js in your index.html.

```
<!-- Angular reservation dependencies -->
<script type="text/javascript" src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
<script type="text/javascript" src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script type="text/javascript" src="bower_components/angular-translate/angular-translate.min.js"></script>
<script src="bower_components/angular-messages/angular-messages.min.js"></script>
<!-- Angular reservation minified -->
<script type="text/javascript" src="bower_components/angular-reservation/dist/angular-reservation.min.js"></script>
```html
<!-- Angular reservation dependencies -->
<script type="text/javascript" src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
<script type="text/javascript" src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script type="text/javascript" src="bower_components/angular-translate/angular-translate.min.js"></script>
<script src="bower_components/angular-messages/angular-messages.min.js"></script>
<!-- Angular reservation minified -->
<script type="text/javascript" src="bower_components/angular-reservation/dist/angular-reservation.min.js"></script>
```

### Load styles
Load bootstrap css and angular-reservation.min.css in your index.html.

```
<!-- Compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="components/bootstrap/bootstrap.min.css">
<!-- Angular reservation minified css -->
<link rel="stylesheet" href="bower_components/angular-reservation/dist/angular-reservation.min.css">
```html
<!-- Compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="components/bootstrap/bootstrap.min.css">
<!-- Angular reservation minified css -->
<link rel="stylesheet" href="bower_components/angular-reservation/dist/angular-reservation.min.css">
```

### Add module dependency
Add 'hm.reservation' to the list of module dependencies.

```
angular.module('myApp', [
'hm.reservation'
])
```javascript
angular.module('myApp', [
'hm.reservation'
])
```

### HTML Markup
Add angular-reservation directive in an html page.

```
<!-- angular-reservation directive -->
<reservation></reservation>
```html
<!-- angular-reservation directive -->
<reservation></reservation>
```

### Setup
Configure module.

```
//Minimal configuration of reservation module
angular.module('myApp').config(function (reservationConfigProvider) {
var config = {
getAvailableHoursAPIUrl: "http://API-URL/availableHours", //API url endpoint to load list of available hours
reserveAPIUrl: "http://API-URL/reserve", //API url endpoint to do a reserve
};
reservationConfigProvider.set(config);
});
```javascript
//Minimal configuration of reservation module
angular.module('myApp').config(function (reservationConfigProvider) {
var config = {
getAvailableHoursAPIUrl: "http://API-URL/availableHours", //API url endpoint to load list of available hours
reserveAPIUrl: "http://API-URL/reserve", //API url endpoint to do a reserve
};

reservationConfigProvider.set(config);
});
```

# [See the full documentation](https://hmartos.github.io/angular-reservation/#!#docs)
Expand Down

0 comments on commit ca32520

Please sign in to comment.