mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Prepare client app
This commit is contained in:
parent
3d446a26ad
commit
bd324a6692
15 changed files with 105 additions and 44 deletions
43
client/components/app/app.component.ts
Normal file
43
client/components/app/app.component.ts
Normal file
|
@ -0,0 +1,43 @@
|
|||
import {Component} from 'angular2/core';
|
||||
import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from 'angular2/router';
|
||||
|
||||
import { VideosAddComponent } from '../videos/add/videos-add.component';
|
||||
import { VideosListComponent } from '../videos/list/videos-list.component';
|
||||
import { VideosWatchComponent } from '../videos/watch/videos-watch.component';
|
||||
|
||||
@RouteConfig([
|
||||
{
|
||||
path: '/videos/list',
|
||||
name: 'VideosList',
|
||||
component: VideosListComponent,
|
||||
useAsDefault: true
|
||||
},
|
||||
{
|
||||
path: '/videos/watch/:id',
|
||||
name: 'VideosWatch',
|
||||
component: VideosWatchComponent
|
||||
},
|
||||
{
|
||||
path: '/videos/add',
|
||||
name: 'VideosAdd',
|
||||
component: VideosAddComponent
|
||||
}
|
||||
])
|
||||
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
templateUrl: 'app/components/app/app.component.html',
|
||||
styleUrls: [ 'app/components/app/app.component.css' ],
|
||||
directives: [ ROUTER_DIRECTIVES ],
|
||||
providers: [ ROUTER_PROVIDERS ]
|
||||
})
|
||||
|
||||
export class AppComponent {
|
||||
makeFriends() {
|
||||
alert('make Friends');
|
||||
}
|
||||
|
||||
quitFriends() {
|
||||
alert('quit Friends');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue