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({
selector: 'my-account',
template: require('./account.component.html')
templateUrl: './account.component.html'
})
export class AccountComponent extends FormReactive implements OnInit {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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