Commit 0e18290652ae7466dc53044dc51479ea7d6894f6
1 parent
f9a26bd764
Exists in
master
and in
1 other branch
Agregado nuevo componente.
Showing
6 changed files
with
46 additions
and
1 deletions
Show diff stats
src/app/app-routing.module.ts
... | ... | @@ -2,10 +2,12 @@ import { NgModule } from '@angular/core'; |
2 | 2 | import { Routes, RouterModule } from '@angular/router'; |
3 | 3 | import { HomeComponent } from './home/home.component'; |
4 | 4 | import { InicioComponent } from './inicio/inicio.component'; |
5 | +import { BusquedaProductosComponent } from './busqueda-productos/busqueda-productos.component'; | |
5 | 6 | |
6 | 7 | const routes: Routes = [ |
7 | 8 | { path: 'home', component: HomeComponent }, |
8 | 9 | { path: 'inicio', component: InicioComponent }, |
10 | + { path: 'busqueda-productos', component: BusquedaProductosComponent }, | |
9 | 11 | { path: '**', redirectTo: '/home', pathMatch: 'full' }, |
10 | 12 | ]; |
11 | 13 |
src/app/app.module.ts
... | ... | @@ -8,6 +8,7 @@ import { SidebarComponent } from './sidebar/sidebar.component'; |
8 | 8 | import { CarouselComponent } from './carousel/carousel.component'; |
9 | 9 | import { HomeComponent } from './home/home.component'; |
10 | 10 | import { InicioComponent } from './inicio/inicio.component'; |
11 | +import { BusquedaProductosComponent } from './busqueda-productos/busqueda-productos.component'; | |
11 | 12 | |
12 | 13 | @NgModule({ |
13 | 14 | declarations: [ |
... | ... | @@ -16,7 +17,8 @@ import { InicioComponent } from './inicio/inicio.component'; |
16 | 17 | SidebarComponent, |
17 | 18 | CarouselComponent, |
18 | 19 | HomeComponent, |
19 | - InicioComponent | |
20 | + InicioComponent, | |
21 | + BusquedaProductosComponent | |
20 | 22 | ], |
21 | 23 | imports: [ |
22 | 24 | BrowserModule, |
src/app/busqueda-productos/busqueda-productos.component.html
... | ... | @@ -0,0 +1 @@ |
1 | +<p>busqueda-productos works!</p> |
src/app/busqueda-productos/busqueda-productos.component.scss
src/app/busqueda-productos/busqueda-productos.component.spec.ts
... | ... | @@ -0,0 +1,25 @@ |
1 | +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |
2 | + | |
3 | +import { BusquedaProductosComponent } from './busqueda-productos.component'; | |
4 | + | |
5 | +describe('BusquedaProductosComponent', () => { | |
6 | + let component: BusquedaProductosComponent; | |
7 | + let fixture: ComponentFixture<BusquedaProductosComponent>; | |
8 | + | |
9 | + beforeEach(async(() => { | |
10 | + TestBed.configureTestingModule({ | |
11 | + declarations: [ BusquedaProductosComponent ] | |
12 | + }) | |
13 | + .compileComponents(); | |
14 | + })); | |
15 | + | |
16 | + beforeEach(() => { | |
17 | + fixture = TestBed.createComponent(BusquedaProductosComponent); | |
18 | + component = fixture.componentInstance; | |
19 | + fixture.detectChanges(); | |
20 | + }); | |
21 | + | |
22 | + it('should create', () => { | |
23 | + expect(component).toBeTruthy(); | |
24 | + }); | |
25 | +}); |
src/app/busqueda-productos/busqueda-productos.component.ts
... | ... | @@ -0,0 +1,15 @@ |
1 | +import { Component, OnInit } from '@angular/core'; | |
2 | + | |
3 | +@Component({ | |
4 | + selector: 'app-busqueda-productos', | |
5 | + templateUrl: './busqueda-productos.component.html', | |
6 | + styleUrls: ['./busqueda-productos.component.scss'] | |
7 | +}) | |
8 | +export class BusquedaProductosComponent implements OnInit { | |
9 | + | |
10 | + constructor() { } | |
11 | + | |
12 | + ngOnInit() { | |
13 | + } | |
14 | + | |
15 | +} |