Commit afe347ca9f4f8774d6df7e5601ace53ffdf36301

Authored by Michel Felipe
1 parent 2e2ffa6a
Exists in master and in 1 other branch dev-fixes

renamed ArticleBlog and removed unnecessary dependencies from ArticleService

src/app/main/main.component.ts
1 import {bundle, Component, StateConfig} from "ng-forward"; 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 import {ArticleView} from "../components/noosfero-articles/article/article_view"; 4 import {ArticleView} from "../components/noosfero-articles/article/article_view";
5 5
@@ -34,7 +34,7 @@ export class MainContent { @@ -34,7 +34,7 @@ export class MainContent {
34 selector: 'main', 34 selector: 'main',
35 template: '<div ng-view></div>', 35 template: '<div ng-view></div>',
36 directives: [ 36 directives: [
37 - NoosferoArticleBlog, ArticleView, Boxes, Block, LinkListBlock, 37 + ArticleBlog, ArticleView, Boxes, Block, LinkListBlock,
38 MainBlock, RecentDocumentsBlock, Navbar, ProfileImageBlock, MembersBlock 38 MainBlock, RecentDocumentsBlock, Navbar, ProfileImageBlock, MembersBlock
39 ], 39 ],
40 providers: [AuthService, Session] 40 providers: [AuthService, Session]
src/lib/ng-noosfero-api/http/article.service.ts
@@ -4,12 +4,16 @@ import { Injectable, Inject } from &quot;ng-forward&quot;; @@ -4,12 +4,16 @@ import { Injectable, Inject } from &quot;ng-forward&quot;;
4 @Inject("Restangular") 4 @Inject("Restangular")
5 export class ArticleService { 5 export class ArticleService {
6 6
7 - constructor(private Restangular: any) {  
8 -  
9 - } 7 + constructor(private Restangular: any) { }
10 8
11 getByProfile(profileId: number, filters: any) { 9 getByProfile(profileId: number, filters: any) {
12 return this.Restangular.service('profiles').one(profileId).one('articles').get(filters); 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 }