main.component.ts
3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import {bundle, Component, StateConfig} from "ng-forward";
import {ArticleBlog} from "./../components/noosfero-articles/blog/blog.component";
import {ArticleView} from "../components/noosfero-articles/article/article_view";
import {Profile} from "../profile/profile.component";
import {Boxes} from "../components/noosfero-boxes/boxes.component";
import {Block} from "../components/noosfero-blocks/block.component";
import {LinkListBlock} from "../components/noosfero-blocks/link-list/link-list.component";
import {RecentDocumentsBlock} from "../components/noosfero-blocks/recent-documents/recent-documents.component";
import {ProfileImageBlock} from "../components/noosfero-blocks/profile-image-block/profile-image-block.component";
import {RawHTMLBlock} from "../components/noosfero-blocks/raw-html/raw-html.component";
import {MembersBlock} from "../components/noosfero-blocks/members-block/members-block.component";
import {NoosferoTemplate} from "../components/noosfero/noosfero-template.filter";
import {DateFormat} from "../components/noosfero/date-format/date-format.filter";
import {AuthService} from "./../components/auth/auth_service";
import {Session} from "./../components/auth/session";
import {Notification} from "./../components/notification/notification.component";
import {Navbar} from "../components/navbar/navbar";
import {MainBlock} from "../components/noosfero-blocks/main-block/main-block.component";
/**
* @ngdoc controller
* @name main.MainContent
* @requires AuthService, Session
* @descrition
* This controller actually contains the main content of Noosfero Angular Theme:
* - the navbar
* - the {@link Main} view content
*
*/
@Component({
selector: 'main-content',
templateUrl: "app/main/main.html",
providers: [AuthService, Session]
})
export class MainContent {
}
/**
* @ngdoc controller
* @name main.Main
* @requires AuthService, Session, Notification, ArticleBlog, ArticleView, Boxes, Block, LinkListBlock,
* MainBlock, RecentDocumentsBlock, Navbar, ProfileImageBlock, MembersBlock,
* NoosferoTemplate, DateFormat, RawHTMLBlock
* @description
* The Main controller for the Noosfero Angular Theme application.
*
* The main route '/' is defined as the URL for this controller, which routes
* requests to the {@link main.MainContent} controller and also, the '/profile' route,
* which routes requests to the {@link profile.Profile} controller. See {@link profile.Profile}
* for more details on how various Noosfero profiles are rendered.
*/
@Component({
selector: 'main',
template: '<div ng-view></div>',
directives: [
ArticleBlog, ArticleView, Boxes, Block, LinkListBlock,
MainBlock, RecentDocumentsBlock, Navbar, ProfileImageBlock,
MembersBlock, NoosferoTemplate, DateFormat, RawHTMLBlock
],
providers: [AuthService, Session, Notification]
})
@StateConfig([
{
url: '/',
component: MainContent,
name: 'main',
},
{
url: "^/:profile",
abstract: true,
component: Profile,
name: 'main.profile',
views: {
"content": {
templateUrl: "app/profile/profile.html",
controller: Profile,
controllerAs: "vm"
}
}
}
])
export class Main {
}