Skip to content

Commit

Permalink
Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
manuquentin committed Apr 16, 2015
1 parent d550d49 commit f028b79
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ module.exports = function (grunt) {
json_server: {
stub: {
options: {
port: 3002,
port: 3000,
db: 'examples/blog/stub-server.json',
keepalive: false
}
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ Your application should use a `ui-view`:
<div ui-view></div>
```

### Dependency-less Version

ng-admin is also available without compiled dependencies : `bower_components/ng-admin/build/ng-admin-only.min.js`.
Please refer to the `examples/blog/index-deps.html` file to get the list of required dependencies to include.

## Example Configuration

We chose to define the entities & views directly in JavaScript to allow greater freedom in the configuration.
Expand Down
4 changes: 2 additions & 2 deletions examples/blog/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
});

var admin = nga.application('ng-admin backend demo') // application main title
.baseApiUrl('http://localhost:3002/'); // main API endpoint
.baseApiUrl('http://localhost:3000/'); // main API endpoint

// define all entities at the top to allow references between them
var post = nga.entity('posts'); // the API endpoint for posts will be http://localhost:3000/posts/:id

var comment = nga.entity('comments')
.baseApiUrl('http://localhost:3002/') // The base API endpoint can be customized by entity
.baseApiUrl('http://localhost:3000/') // The base API endpoint can be customized by entity
.identifier(nga.field('id')); // you can optionally customize the identifier used in the api ('id' by default)

var tag = nga.entity('tags')
Expand Down
4 changes: 2 additions & 2 deletions examples/blog/stub-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"id": 11,
"post_id": 1,
"author": "Logan Schowalter",
"body": "I don't want to be?' it asked. 'Oh, I'm not Ada,' she said, 'and see whether it's <i><b>marked</b></i> \"poison\" or not'; for she had asked it aloud; and in despair she put her hand on the end of the.",
"body": "I don't want to be?' it asked. 'Oh, I'm not Ada,' she said, 'and see whether it's marked \"poison\" or not'; for she had asked it aloud; and in despair she put her hand on the end of the.",
"created_at": "2012-08-05"
}
],
Expand Down Expand Up @@ -274,4 +274,4 @@
"published": 1
}
]
}
}

0 comments on commit f028b79

Please sign in to comment.