Commit afe347ca9f4f8774d6df7e5601ace53ffdf36301
1 parent
2e2ffa6a
Exists in
master
and in
34 other branches
renamed ArticleBlog and removed unnecessary dependencies from ArticleService
Showing
2 changed files
with
9 additions
and
5 deletions
Show diff stats
src/app/main/main.component.ts
| 1 | 1 | import {bundle, Component, StateConfig} from "ng-forward"; |
| 2 | -import {NoosferoArticleBlog} from "./../components/noosfero-articles/blog/blog.component"; | |
| 2 | +import {ArticleBlog} from "./../components/noosfero-articles/blog/blog.component"; | |
| 3 | 3 | |
| 4 | 4 | import {ArticleView} from "../components/noosfero-articles/article/article_view"; |
| 5 | 5 | |
| ... | ... | @@ -34,7 +34,7 @@ export class MainContent { |
| 34 | 34 | selector: 'main', |
| 35 | 35 | template: '<div ng-view></div>', |
| 36 | 36 | directives: [ |
| 37 | - NoosferoArticleBlog, ArticleView, Boxes, Block, LinkListBlock, | |
| 37 | + ArticleBlog, ArticleView, Boxes, Block, LinkListBlock, | |
| 38 | 38 | MainBlock, RecentDocumentsBlock, Navbar, ProfileImageBlock, MembersBlock |
| 39 | 39 | ], |
| 40 | 40 | providers: [AuthService, Session] | ... | ... |
src/lib/ng-noosfero-api/http/article.service.ts
| ... | ... | @@ -4,12 +4,16 @@ import { Injectable, Inject } from "ng-forward"; |
| 4 | 4 | @Inject("Restangular") |
| 5 | 5 | export class ArticleService { |
| 6 | 6 | |
| 7 | - constructor(private Restangular: any) { | |
| 8 | - | |
| 9 | - } | |
| 7 | + constructor(private Restangular: any) { } | |
| 10 | 8 | |
| 11 | 9 | getByProfile(profileId: number, filters: any) { |
| 12 | 10 | return this.Restangular.service('profiles').one(profileId).one('articles').get(filters); |
| 13 | 11 | } |
| 14 | 12 | |
| 13 | + getChildren(id: number, filters: any) { | |
| 14 | + return this.Restangular.service('articles').one(id).customGET('children', filters); | |
| 15 | + } | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 15 | 19 | } | ... | ... |