Commit c8e9f2159358176f963d0f604f6fdc3bf70c500c
1 parent
af4b2eff
Exists in
master
and in
4 other branches
Load content of acessibility page from API
Showing
3 changed files
with
18 additions
and
0 deletions
Show diff stats
src/app/components/dialoga-service/dialoga.service.js
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | extendedService.serviceDialoga = $rootScope.basePath + '/api/v1/dialoga_plugin/'; |
15 | 15 | extendedService.getHome = getHome; |
16 | 16 | extendedService.getAbout = getAbout; |
17 | + extendedService.getAcessibility = getAcessibility; | |
17 | 18 | extendedService.getTerms = getTerms; |
18 | 19 | extendedService.getThemes = getThemes; |
19 | 20 | extendedService.getThemeBySlug = getThemeBySlug; |
... | ... | @@ -68,6 +69,19 @@ |
68 | 69 | } |
69 | 70 | } |
70 | 71 | |
72 | + function getAcessibility (cbSuccess, cbError) { | |
73 | + if( !!CACHE.acessibility ){ | |
74 | + cbSuccess(CACHE.acessibility); | |
75 | + }else{ | |
76 | + // load article content | |
77 | + ArticleService.getArticleById(API.articleId.acessibility, {}, function (article){ | |
78 | + CACHE.acessibility = article; | |
79 | + | |
80 | + cbSuccess(CACHE.acessibility); | |
81 | + }, cbError); | |
82 | + } | |
83 | + } | |
84 | + | |
71 | 85 | function getTerms (cbSuccess, cbError) { |
72 | 86 | if( !!CACHE.terms ){ |
73 | 87 | cbSuccess(CACHE.terms); | ... | ... |
src/app/index.constants.js
src/app/pages/article/article.controller.js