Skip to content

Commit

Permalink
agregar basic component, number y uncommon.
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoscifo committed Dec 12, 2024
1 parent b9a7bb0 commit a41f73b
Show file tree
Hide file tree
Showing 14 changed files with 132 additions and 8 deletions.
7 changes: 6 additions & 1 deletion 05-pipesApp/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [];
const routes: Routes = [
{
path: '',
loadChildren: () => import('./products/products.module').then(m => m.ProductsModule),
}
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
Expand Down
10 changes: 7 additions & 3 deletions 05-pipesApp/src/app/prime-ng/prime-ng.module.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { NgModule } from '@angular/core';

import { ButtonModule } from 'primeng/button';
import { MenuModule } from 'primeng/menu';
import { CardModule } from 'primeng/card';
import { FieldsetModule } from 'primeng/fieldset';
import { MenubarModule } from 'primeng/menubar';
import { PanelModule } from 'primeng/panel';

@NgModule({
exports: [
ButtonModule,
MenuModule,
MenubarModule
CardModule,
FieldsetModule,
MenubarModule,
PanelModule
],
})
export class PrimeNgModule {}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<p-panel [showHeader]="false">
<h1>Pipe Básicos</h1>
<p>
Pipes incluídos en Angular - Usualmente en el Common Module
</p>
</p-panel>

<div class="p-grid">
<div class="p-col-4">
<p-card header="uppercase">
{{ nameLower | uppercase }}
</p-card>
</div>
<div class="p-col-4">
<p-card header="lowercase">
{{ nameUpper | lowercase }}
</p-card>
</div>
<div class="p-col-4">
<p-card header="titlecase">
{{ fullName | titlecase }}
</p-card>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-basics-page',
templateUrl: './basics-page.component.html',
styleUrl: './basics-page.component.css'
})
export class BasicsPageComponent {

public nameLower: string = 'diego';
public nameUpper: string = 'DIEGO';
public fullName: string = 'DiEgO';
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>numbers-page works!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-numbers-page',
templateUrl: './numbers-page.component.html',
styleUrl: './numbers-page.component.css'
})
export class NumbersPageComponent {

}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>uncommon-page works!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-uncommon-page',
templateUrl: './uncommon-page.component.html',
styleUrl: './uncommon-page.component.css'
})
export class UncommonPageComponent {

}
30 changes: 30 additions & 0 deletions 05-pipesApp/src/app/products/products-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { BasicsPageComponent } from './pages/basics-page/basics-page.component';
import { NumbersPageComponent } from './pages/numbers-page/numbers-page.component';
import { UncommonPageComponent } from './pages/uncommon-page/uncommon-page.component';

const routes: Routes = [
{
path: '',
component: BasicsPageComponent
},
{
path: 'numbers',
component: NumbersPageComponent
},
{
path: 'uncommon',
component: UncommonPageComponent
},
{
path: '**',
redirectTo: ''
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ProductsRoutingModule { }
23 changes: 23 additions & 0 deletions 05-pipesApp/src/app/products/products.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ProductsRoutingModule } from './products-routing.module';
import { BasicsPageComponent } from './pages/basics-page/basics-page.component';
import { NumbersPageComponent } from './pages/numbers-page/numbers-page.component';
import { UncommonPageComponent } from './pages/uncommon-page/uncommon-page.component';
import { PrimeNgModule } from '../prime-ng/prime-ng.module';


@NgModule({
declarations: [
BasicsPageComponent,
NumbersPageComponent,
UncommonPageComponent
],
imports: [
CommonModule,
ProductsRoutingModule,
PrimeNgModule
]
})
export class ProductsModule { }
11 changes: 7 additions & 4 deletions 05-pipesApp/src/app/shared/components/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ export class MenuComponent implements OnInit {
items: [
{
label: 'Texto y Fechas',
icon: 'pi pi-align-left'
icon: 'pi pi-align-left',
routerLink: 'basics'
},
{
label: 'Números',
icon: 'pi pi-dollar'
icon: 'pi pi-dollar',
routerLink: 'numbers'
},
{
label: 'No coomunes',
icon: 'pi pi-globe'
label: 'No comunes',
icon: 'pi pi-globe',
routerLink: 'uncommon'
},
]
},
Expand Down

0 comments on commit a41f73b

Please sign in to comment.