Skip to content

Commit 97c35b6

Browse files
author
ALEXANDRU BEZDADEA
committed
rute aparent functionale
1 parent be3b077 commit 97c35b6

9 files changed

+79
-3
lines changed

docs/main.4e6845d1a882cb3e.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<p>afisare-produse works!</p>
2+

src/app/afisare-produse/afisare-produse.component.scss

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { AfisareProduseComponent } from './afisare-produse.component';
4+
5+
describe('AfisareProduseComponent', () => {
6+
let component: AfisareProduseComponent;
7+
let fixture: ComponentFixture<AfisareProduseComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ AfisareProduseComponent ]
12+
})
13+
.compileComponents();
14+
});
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(AfisareProduseComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-afisare-produse',
5+
templateUrl: './afisare-produse.component.html',
6+
styleUrls: ['./afisare-produse.component.scss']
7+
})
8+
export class AfisareProduseComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit(): void {
13+
}
14+
15+
}

src/app/app-routing.module.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { RouterModule, Routes } from '@angular/router';
5+
6+
import { AfisareProduseComponent } from './afisare-produse/afisare-produse.component';
7+
import { ShoppingCart } from './shopping-cart';
8+
9+
10+
const routes: Routes = [
11+
{ path: '', redirectTo: 'AppComponent', pathMatch: 'full' },
12+
{ path: 'produse', component: AfisareProduseComponent },
13+
{ path: 'cart', component: ShoppingCart }
14+
];
15+
16+
17+
@NgModule({
18+
imports: [
19+
RouterModule.forRoot(
20+
routes,
21+
{ enableTracing: true } // <-- debugging purposes only
22+
)
23+
// other imports here
24+
],
25+
26+
})
27+
export class AppRoutingModule { }

src/app/app.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@
4444
</div>
4545
</ng-template>
4646
</div>
47+

src/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { UpdateService } from './update.service';
77
import { environment } from '../environments/environment';
88
import { getMainBarcodeScanningCamera } from './camera-access';
99
// import { Firestore, collectionData, collection } from '@angular/fire/firestore';
10-
import { Observable } from 'rxjs';
1110

1211

1312
@Component({

src/app/app.module.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,24 @@ import { environment } from '../environments/environment';
1111
import { HttpClientModule } from '@angular/common/http';
1212

1313
import { AngularFireModule} from '@angular/fire/compat';
14+
import { AppRoutingModule } from './app-routing.module';
15+
import { AfisareProduseComponent } from './afisare-produse/afisare-produse.component';
16+
import { RouterModule } from '@angular/router';
1417

1518

1619

1720

1821
@NgModule({
1922
declarations: [
2023
AppComponent,
21-
ShoppingCartItemComponent
24+
ShoppingCartItemComponent,
25+
AfisareProduseComponent
2226
],
2327
imports: [
2428
BrowserModule,
2529
FormsModule,
2630
HttpClientModule,
31+
RouterModule,
2732

2833

2934
// provideFirebaseApp(() => initializeApp({ ... })),
@@ -35,7 +40,8 @@ import { AngularFireModule} from '@angular/fire/compat';
3540

3641

3742
// PWA support
38-
ServiceWorkerModule.register('ngsw-worker.js')
43+
ServiceWorkerModule.register('ngsw-worker.js'),
44+
AppRoutingModule
3945
],
4046
providers: [
4147
{

0 commit comments

Comments
 (0)