main.component.ts
1.13 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
import {bundle, Component, StateConfig} from "ng-forward";
import {NoosferoArticleBlog} from "./../components/noosfero-articles/blog/blog.component.ts";
import {ArticleDirective} from "../components/noosfero-articles/article/article.directive.ts";
import {Profile} from "../profile/profile.component";
@Component({
selector: 'main-content',
templateUrl: "app/main/main.html",
})
export class MainContent {
}
@Component({
selector: 'main',
template: '<div ng-view></div>',
directives: [NoosferoArticleBlog, ArticleDirective]
})
@StateConfig([
{
url: '/',
component: MainContent,
name: 'main',
resolve: {
currentUser: function(AuthService) {
return AuthService.loginFromCookie();
}
}
},
{
url: "^/:profile",
abstract: true,
component: Profile,
name: 'main.profile',
views: {
"content": {
templateUrl: "app/profile/profile.html",
controller: "ProfileController",
controllerAs: "vm"
}
}
}
])
export class Main {
}