Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made child state finder method allow recursion, added article listing…
…s and curation pages
- Loading branch information
Showing
8 changed files
with
131 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h2>Article Curation</h2> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module app.admin.articles.curation { | ||
|
||
export const namespace = 'app.admin.articles.curation'; | ||
|
||
export class ArticlesCurationConfig { | ||
|
||
static $inject = ['stateHelperServiceProvider']; | ||
constructor(private stateHelperServiceProvider){ | ||
|
||
let state:global.IState = { | ||
url: '/curation', | ||
views: { | ||
"main@app.admin": { | ||
controller: namespace+'.controller', | ||
controllerAs: 'CurationController', | ||
templateUrl: 'templates/app/admin/articles/curation/curation.tpl.html' | ||
} | ||
}, | ||
resolve: /*@ngInject*/{ | ||
}, | ||
data: { | ||
title: "Article Curation", | ||
icon: 'description', | ||
navigation: true, | ||
sortAfter: app.admin.articles.listing.namespace, | ||
} | ||
}; | ||
|
||
stateHelperServiceProvider.addState(namespace, state); | ||
|
||
} | ||
|
||
} | ||
|
||
export class ArticlesCurationController { | ||
|
||
static $inject = []; | ||
constructor() { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.config(ArticlesCurationConfig) | ||
.controller(namespace+'.controller', ArticlesCurationController); | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
module app.admin.articles.listing { | ||
|
||
export const namespace = 'app.admin.articles.listing'; | ||
|
||
export class ArticlesListingConfig { | ||
|
||
static $inject = ['stateHelperServiceProvider']; | ||
constructor(private stateHelperServiceProvider){ | ||
|
||
let state:global.IState = { | ||
url: '/listing', | ||
views: { | ||
"main@app.admin": { | ||
controller: namespace+'.controller', | ||
controllerAs: 'ArticlesListingController', | ||
templateUrl: 'templates/app/admin/articles/listing/listing.tpl.html' | ||
} | ||
}, | ||
resolve: /*@ngInject*/{ | ||
allArticles: (articleService:common.services.article.ArticleService) => { | ||
return articleService.getAllArticles(); | ||
} | ||
}, | ||
data: { | ||
title: "Articles Listing", | ||
icon: 'description', | ||
navigation: true, | ||
} | ||
}; | ||
|
||
stateHelperServiceProvider.addState(namespace, state); | ||
|
||
} | ||
|
||
} | ||
|
||
export class ArticlesListingController { | ||
|
||
static $inject = ['allArticles']; | ||
constructor(public allArticles:common.services.article.IArticle[]) { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.config(ArticlesListingConfig) | ||
.controller(namespace+'.controller', ArticlesListingController); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters