Client: use templateUrl/styleUrls instead of require

pull/10/head
Chocobozzz 2016-09-19 22:49:31 +02:00
parent ad22074a78
commit ec8d8440a8
16 changed files with 25 additions and 25 deletions

View File

@ -8,7 +8,7 @@ import { FormReactive, USER_PASSWORD } from '../shared';
@Component({ @Component({
selector: 'my-account', selector: 'my-account',
template: require('./account.component.html') templateUrl: './account.component.html'
}) })
export class AccountComponent extends FormReactive implements OnInit { export class AccountComponent extends FormReactive implements OnInit {

View File

@ -7,8 +7,8 @@ import { FriendService } from '../shared';
@Component({ @Component({
selector: 'my-friend-add', selector: 'my-friend-add',
template: require('./friend-add.component.html'), templateUrl: './friend-add.component.html',
styles: [ require('./friend-add.component.scss') ] styleUrls: [ './friend-add.component.scss' ]
}) })
export class FriendAddComponent implements OnInit { export class FriendAddComponent implements OnInit {
form: FormGroup; form: FormGroup;

View File

@ -4,8 +4,8 @@ import { Friend, FriendService } from '../shared';
@Component({ @Component({
selector: 'my-friend-list', selector: 'my-friend-list',
template: require('./friend-list.component.html'), templateUrl: './friend-list.component.html',
styles: [ require('./friend-list.component.scss') ] styleUrls: [ './friend-list.component.scss' ]
}) })
export class FriendListComponent implements OnInit { export class FriendListComponent implements OnInit {
friends: Friend[]; friends: Friend[];

View File

@ -2,6 +2,6 @@ import { Component } from '@angular/core';
@Component({ @Component({
selector: 'my-menu-admin', selector: 'my-menu-admin',
template: require('./menu-admin.component.html') templateUrl: './menu-admin.component.html'
}) })
export class MenuAdminComponent { } export class MenuAdminComponent { }

View File

@ -7,7 +7,7 @@ import { FormReactive, USER_USERNAME, USER_PASSWORD } from '../../../shared';
@Component({ @Component({
selector: 'my-user-add', selector: 'my-user-add',
template: require('./user-add.component.html') templateUrl: './user-add.component.html'
}) })
export class UserAddComponent extends FormReactive implements OnInit { export class UserAddComponent extends FormReactive implements OnInit {
error: string = null; error: string = null;

View File

@ -5,8 +5,8 @@ import { UserService } from '../shared';
@Component({ @Component({
selector: 'my-user-list', selector: 'my-user-list',
template: require('./user-list.component.html'), templateUrl: './user-list.component.html',
styles: [ require('./user-list.component.scss') ] styleUrls: [ './user-list.component.scss' ]
}) })
export class UserListComponent implements OnInit { export class UserListComponent implements OnInit {
totalUsers: number; totalUsers: number;

View File

@ -3,8 +3,8 @@ import { Router } from '@angular/router';
@Component({ @Component({
selector: 'my-app', selector: 'my-app',
template: require('./app.component.html'), templateUrl: './app.component.html',
styles: [ require('./app.component.scss') ] styleUrls: [ './app.component.scss' ]
}) })
export class AppComponent { export class AppComponent {

View File

@ -6,7 +6,7 @@ import { AuthService, FormReactive } from '../shared';
@Component({ @Component({
selector: 'my-login', selector: 'my-login',
template: require('./login.component.html') templateUrl: './login.component.html'
}) })
export class LoginComponent extends FormReactive implements OnInit { export class LoginComponent extends FormReactive implements OnInit {

View File

@ -5,7 +5,7 @@ import { AuthService, AuthStatus } from './shared';
@Component({ @Component({
selector: 'my-menu', selector: 'my-menu',
template: require('./menu.component.html') templateUrl: './menu.component.html'
}) })
export class MenuComponent implements OnInit { export class MenuComponent implements OnInit {
isLoggedIn: boolean; isLoggedIn: boolean;

View File

@ -7,7 +7,7 @@ import { SearchService } from './search.service';
@Component({ @Component({
selector: 'my-search', selector: 'my-search',
template: require('./search.component.html') templateUrl: './search.component.html'
}) })
export class SearchComponent implements OnInit { export class SearchComponent implements OnInit {

View File

@ -2,8 +2,8 @@ import { Component, Input } from '@angular/core';
@Component({ @Component({
selector: 'my-loader', selector: 'my-loader',
styles: [ require('./loader.component.scss') ], styleUrls: [ './loader.component.scss' ],
template: require('./loader.component.html') templateUrl: './loader.component.html'
}) })
export class LoaderComponent { export class LoaderComponent {

View File

@ -8,8 +8,8 @@ import { AuthService, FormReactive, VIDEO_NAME, VIDEO_DESCRIPTION, VIDEO_TAGS }
@Component({ @Component({
selector: 'my-videos-add', selector: 'my-videos-add',
styles: [ require('./video-add.component.scss') ], styleUrls: [ './video-add.component.scss' ],
template: require('./video-add.component.html') templateUrl: './video-add.component.html'
}) })
export class VideoAddComponent extends FormReactive implements OnInit { export class VideoAddComponent extends FormReactive implements OnInit {

View File

@ -12,8 +12,8 @@ import { SearchService } from '../../shared';
@Component({ @Component({
selector: 'my-videos-list', selector: 'my-videos-list',
styles: [ require('./video-list.component.scss') ], styleUrls: [ './video-list.component.scss' ],
template: require('./video-list.component.html') templateUrl: './video-list.component.html'
}) })
export class VideoListComponent implements OnInit, OnDestroy { export class VideoListComponent implements OnInit, OnDestroy {

View File

@ -5,8 +5,8 @@ import { User } from '../../shared';
@Component({ @Component({
selector: 'my-video-miniature', selector: 'my-video-miniature',
styles: [ require('./video-miniature.component.scss') ], styleUrls: [ './video-miniature.component.scss' ],
template: require('./video-miniature.component.html') templateUrl: './video-miniature.component.html'
}) })
export class VideoMiniatureComponent { export class VideoMiniatureComponent {

View File

@ -4,7 +4,7 @@ import { SortField } from '../shared';
@Component({ @Component({
selector: 'my-video-sort', selector: 'my-video-sort',
template: require('./video-sort.component.html') templateUrl: './video-sort.component.html'
}) })
export class VideoSortComponent { export class VideoSortComponent {

View File

@ -6,8 +6,8 @@ import { WebTorrentService } from './webtorrent.service';
@Component({ @Component({
selector: 'my-video-watch', selector: 'my-video-watch',
template: require('./video-watch.component.html'), templateUrl: './video-watch.component.html',
styles: [ require('./video-watch.component.scss') ] styleUrls: [ './video-watch.component.scss' ]
}) })
export class VideoWatchComponent implements OnInit, OnDestroy { export class VideoWatchComponent implements OnInit, OnDestroy {