mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-22 07:54:06 +01:00
refactor(app): rename components, move tinymce to separate file
This commit is contained in:
parent
923e56c3d2
commit
3ac268a096
40 changed files with 199 additions and 136 deletions
|
|
@ -5,6 +5,6 @@ import { Component } from '@angular/core';
|
|||
styleUrls: ['./buttons.component.scss'],
|
||||
templateUrl: './buttons.component.html',
|
||||
})
|
||||
export class NgxButtonsComponent {
|
||||
export class ButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-disabled-buttons',
|
||||
templateUrl: './disabled.component.html',
|
||||
})
|
||||
export class NgxDisabledButtonsComponent {
|
||||
export class DisabledButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-dropdown-buttons',
|
||||
templateUrl: './dropdown.component.html',
|
||||
})
|
||||
export class NgxDropdownButtonsComponent {
|
||||
export class DropdownButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-flat-buttons',
|
||||
templateUrl: './flat.component.html',
|
||||
})
|
||||
export class NgxFlatButtonsComponent {
|
||||
export class FlatButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-group-buttons',
|
||||
templateUrl: './group.component.html',
|
||||
})
|
||||
export class NgxGroupButtonsComponent {
|
||||
export class GroupButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-icon-buttons',
|
||||
templateUrl: './icon.component.html',
|
||||
})
|
||||
export class NgxIconButtonsComponent {
|
||||
export class IconButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-large-buttons',
|
||||
templateUrl: './large.component.html',
|
||||
})
|
||||
export class NgxLargeButtonsComponent {
|
||||
export class LargeButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-raised-buttons',
|
||||
templateUrl: './raised.component.html',
|
||||
})
|
||||
export class NgxRaisedButtonsComponent {
|
||||
export class RaisedButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-sized-buttons',
|
||||
templateUrl: './sized.component.html',
|
||||
})
|
||||
export class NgxSizedButtonsComponent {
|
||||
export class SizedButtonsComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ import { Component } from '@angular/core';
|
|||
styleUrls: ['./grid.component.scss'],
|
||||
templateUrl: './grid.component.html',
|
||||
})
|
||||
export class NgxGridComponent {
|
||||
export class GridComponent {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { Component, Pipe, PipeTransform } from '@angular/core';
|
|||
styleUrls: ['./icons.component.scss'],
|
||||
templateUrl: './icons.component.html',
|
||||
})
|
||||
export class NgxIconsComponent {
|
||||
export class IconsComponent {
|
||||
|
||||
icons = {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
|||
selector: 'ngx-modal',
|
||||
templateUrl: './modal.component.html',
|
||||
})
|
||||
export class NgxModalComponent {
|
||||
export class ModalComponent {
|
||||
|
||||
modalHeader: string;
|
||||
modalContent: string = `Lorem ipsum dolor sit amet,
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
import { NgxModalComponent } from './modal/modal.component';
|
||||
import { ModalComponent } from './modal/modal.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-modals',
|
||||
styleUrls: ['./modals.component.scss'],
|
||||
templateUrl: './modals.component.html',
|
||||
})
|
||||
export class NgxModalsComponent {
|
||||
export class ModalsComponent {
|
||||
|
||||
constructor(private modalService: NgbModal) { }
|
||||
|
||||
showLargeModal() {
|
||||
const activeModal = this.modalService.open(NgxModalComponent, { size: 'lg' });
|
||||
const activeModal = this.modalService.open(ModalComponent, { size: 'lg' });
|
||||
|
||||
activeModal.componentInstance.modalHeader = 'Large Modal';
|
||||
}
|
||||
showSmallModal() {
|
||||
const activeModal = this.modalService.open(NgxModalComponent, { size: 'sm' });
|
||||
const activeModal = this.modalService.open(ModalComponent, { size: 'sm' });
|
||||
|
||||
activeModal.componentInstance.modalHeader = 'Small Modal';
|
||||
}
|
||||
|
||||
showStaticModal() {
|
||||
const activeModal = this.modalService.open(NgxModalComponent, {
|
||||
const activeModal = this.modalService.open(ModalComponent, {
|
||||
size: 'sm',
|
||||
backdrop: 'static',
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,35 +1,27 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { NgxUiFeaturesComponent } from './ui-features.component';
|
||||
import { NgxButtonsComponent } from './buttons/buttons.component';
|
||||
import { NgxGridComponent } from './grid/grid.component';
|
||||
import { NgxIconsComponent } from './icons/icons.component';
|
||||
import { NgxModalsComponent } from './modals/modals.component';
|
||||
import { NgxFlatButtonsComponent } from './buttons/flat/flat.component';
|
||||
import { NgxRaisedButtonsComponent } from './buttons/raised/raised.component';
|
||||
import { NgxSizedButtonsComponent } from './buttons/sized/sized.component';
|
||||
import { NgxDisabledButtonsComponent } from './buttons/disabled/disabled.component';
|
||||
import { NgxIconButtonsComponent } from './buttons/icon/icon.component';
|
||||
import { NgxDropdownButtonsComponent } from './buttons/dropdown/dropdown.component';
|
||||
import { NgxLargeButtonsComponent } from './buttons/large/large.component';
|
||||
import { NgxGroupButtonsComponent } from './buttons/group/group.component';
|
||||
import { UiFeaturesComponent } from './ui-features.component';
|
||||
import { ButtonsComponent } from './buttons/buttons.component';
|
||||
import { GridComponent } from './grid/grid.component';
|
||||
import { IconsComponent } from './icons/icons.component';
|
||||
import { ModalsComponent } from './modals/modals.component';
|
||||
|
||||
const routes: Routes = [{
|
||||
path: '',
|
||||
component: NgxUiFeaturesComponent,
|
||||
component: UiFeaturesComponent,
|
||||
children: [{
|
||||
path: 'buttons',
|
||||
component: NgxButtonsComponent,
|
||||
component: ButtonsComponent,
|
||||
}, {
|
||||
path: 'grid',
|
||||
component: NgxGridComponent,
|
||||
component: GridComponent,
|
||||
}, {
|
||||
path: 'icons',
|
||||
component: NgxIconsComponent,
|
||||
component: IconsComponent,
|
||||
}, {
|
||||
path: 'modals',
|
||||
component: NgxModalsComponent,
|
||||
component: ModalsComponent,
|
||||
}],
|
||||
}];
|
||||
|
||||
|
|
@ -37,4 +29,4 @@ const routes: Routes = [{
|
|||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class NgxUiFeaturesRoutingModule { }
|
||||
export class UiFeaturesRoutingModule { }
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ import { Component } from '@angular/core';
|
|||
<router-outlet></router-outlet>
|
||||
`,
|
||||
})
|
||||
export class NgxUiFeaturesComponent {
|
||||
export class UiFeaturesComponent {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,50 +1,50 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { NgxSharedModule } from '../../@shared/shared.module';
|
||||
import { SharedModule } from '../../shared.module';
|
||||
|
||||
import { NgxUiFeaturesRoutingModule } from './ui-features-routing.module';
|
||||
import { NgxUiFeaturesComponent } from './ui-features.component';
|
||||
import { NgxButtonsComponent } from './buttons/buttons.component';
|
||||
import { NgxGridComponent } from './grid/grid.component';
|
||||
import { NgxModalsComponent } from './modals/modals.component';
|
||||
import { NgxIconsComponent } from './icons/icons.component';
|
||||
import { NgxFlatButtonsComponent } from './buttons/flat/flat.component';
|
||||
import { NgxRaisedButtonsComponent } from './buttons/raised/raised.component';
|
||||
import { NgxSizedButtonsComponent } from './buttons/sized/sized.component';
|
||||
import { NgxDisabledButtonsComponent } from './buttons/disabled/disabled.component';
|
||||
import { NgxIconButtonsComponent } from './buttons/icon/icon.component';
|
||||
import { NgxDropdownButtonsComponent } from './buttons/dropdown/dropdown.component';
|
||||
import { NgxGroupButtonsComponent } from './buttons/group/group.component';
|
||||
import { NgxLargeButtonsComponent } from './buttons/large/large.component';
|
||||
import { NgxModalComponent } from './modals/modal/modal.component';
|
||||
import { UiFeaturesRoutingModule } from './ui-features-routing.module';
|
||||
import { UiFeaturesComponent } from './ui-features.component';
|
||||
import { ButtonsComponent } from './buttons/buttons.component';
|
||||
import { GridComponent } from './grid/grid.component';
|
||||
import { ModalsComponent } from './modals/modals.component';
|
||||
import { IconsComponent } from './icons/icons.component';
|
||||
import { FlatButtonsComponent } from './buttons/flat/flat.component';
|
||||
import { RaisedButtonsComponent } from './buttons/raised/raised.component';
|
||||
import { SizedButtonsComponent } from './buttons/sized/sized.component';
|
||||
import { DisabledButtonsComponent } from './buttons/disabled/disabled.component';
|
||||
import { IconButtonsComponent } from './buttons/icon/icon.component';
|
||||
import { DropdownButtonsComponent } from './buttons/dropdown/dropdown.component';
|
||||
import { GroupButtonsComponent } from './buttons/group/group.component';
|
||||
import { LargeButtonsComponent } from './buttons/large/large.component';
|
||||
import { ModalComponent } from './modals/modal/modal.component';
|
||||
|
||||
export const NGX_UI_FEATURES_COMPONENTS = [
|
||||
NgxUiFeaturesComponent,
|
||||
NgxButtonsComponent,
|
||||
NgxGridComponent,
|
||||
NgxIconsComponent,
|
||||
NgxModalsComponent,
|
||||
NgxFlatButtonsComponent,
|
||||
NgxRaisedButtonsComponent,
|
||||
NgxSizedButtonsComponent,
|
||||
NgxDisabledButtonsComponent,
|
||||
NgxIconButtonsComponent,
|
||||
NgxDropdownButtonsComponent,
|
||||
NgxLargeButtonsComponent,
|
||||
NgxGroupButtonsComponent,
|
||||
NgxModalComponent,
|
||||
const COMPONENTS = [
|
||||
UiFeaturesComponent,
|
||||
ButtonsComponent,
|
||||
GridComponent,
|
||||
ModalsComponent,
|
||||
IconsComponent,
|
||||
FlatButtonsComponent,
|
||||
RaisedButtonsComponent,
|
||||
SizedButtonsComponent,
|
||||
DisabledButtonsComponent,
|
||||
IconButtonsComponent,
|
||||
DropdownButtonsComponent,
|
||||
GroupButtonsComponent,
|
||||
LargeButtonsComponent,
|
||||
ModalComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
NgxSharedModule,
|
||||
NgxUiFeaturesRoutingModule,
|
||||
SharedModule,
|
||||
UiFeaturesRoutingModule,
|
||||
],
|
||||
declarations: [
|
||||
...NGX_UI_FEATURES_COMPONENTS,
|
||||
...COMPONENTS,
|
||||
],
|
||||
entryComponents: [
|
||||
NgxModalComponent,
|
||||
ModalComponent,
|
||||
],
|
||||
})
|
||||
export class NgxUiFeaturesModule { }
|
||||
export class UiFeaturesModule { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue