Skip to content

Commit

Permalink
Merge pull request #8 from thisissoon/feature/fix-docs
Browse files Browse the repository at this point in the history
Fix: Example in documentation
  • Loading branch information
edoparearyee committed Oct 5, 2015
2 parents d12ba4d + 368e07a commit 7bb9a7c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -64,9 +64,11 @@ in case the data you need is not available in app config:
```javascript
angular.module('myApp', ['sn.meta'])
.controller('MyCtrl',[
'snTitle',
function (snTitle){
snTitle.setPageTitle('My Page');
'snMeta',
function (snMeta){
snMeta.setMetaContent({
description: 'My page description'
});
}
])
```
Expand Down
38 changes: 20 additions & 18 deletions app/js/meta.js
Expand Up @@ -12,21 +12,21 @@
* `<meta name="description" content="My page description">`.
*
* @example
$routeProvider
.when('/pageone', {
controller: 'pageoneCtrl'
meta: {
description: 'Page one description'
},
templateUrl: 'partials/pageone.html'
})
.when('/pagetwo', {
controller: 'pagetwoCtrl'
meta: {
description: 'Page two description'
},
templateUrl: 'partials/pagetwo.html'
})
$routeProvider
.when('/pageone', {
controller: 'pageoneCtrl'
meta: {
description: 'Page one description'
},
templateUrl: 'partials/pageone.html'
})
.when('/pagetwo', {
controller: 'pagetwoCtrl'
meta: {
description: 'Page two description'
},
templateUrl: 'partials/pagetwo.html'
})
* @main sn.meta
* @module sn.meta
* @author SOON_
Expand Down Expand Up @@ -142,9 +142,11 @@ angular.module('sn.meta', ['ngRoute'])
* @example
angular.module('myApp', ['sn.meta'])
.controller('MyCtrl',[
'snTitle',
function (snTitle){
snTitle.setPageTitle('My Page');
'snMeta',
function (snMeta){
snMeta.setMetaContent({
description: 'My page description'
});
}
])
* @class snMeta
Expand Down

0 comments on commit 7bb9a7c

Please sign in to comment.