Browse Source

Added front end

master
Suhas 4 years ago
parent
commit
19600e9fed
76 changed files with 12649 additions and 228 deletions
  1. 221
      Product.postman_collection.json
  2. 102
      insertProds.txt
  3. 0
      productBE/.gitignore
  4. 0
      productBE/.mvn/wrapper/MavenWrapperDownloader.java
  5. 0
      productBE/.mvn/wrapper/maven-wrapper.jar
  6. 0
      productBE/.mvn/wrapper/maven-wrapper.properties
  7. 0
      productBE/mvnw
  8. 0
      productBE/mvnw.cmd
  9. 0
      productBE/pom.xml
  10. 0
      productBE/src/main/java/com/example/londonStore/CorsConfig.java
  11. 0
      productBE/src/main/java/com/example/londonStore/ProductApplication.java
  12. 0
      productBE/src/main/java/com/example/londonStore/SecurityConfig.java
  13. 7
      productBE/src/main/java/com/example/londonStore/controller/ProductController.java
  14. 0
      productBE/src/main/java/com/example/londonStore/model/Product.java
  15. 0
      productBE/src/main/java/com/example/londonStore/repository/ProductRepository.java
  16. 0
      productBE/src/main/java/com/example/londonStore/service/ProductService.java
  17. 6
      productBE/src/main/resources/application.properties
  18. 0
      productBE/src/test/java/com/example/londonStore/ProductApplicationTests.java
  19. 6
      productFE/proxy.conf.json
  20. 16
      productFE/src/app/app-routing.module.ts
  21. 0
      productFE/src/app/app.component.css
  22. 2
      productFE/src/app/app.component.html
  23. 35
      productFE/src/app/app.component.spec.ts
  24. 10
      productFE/src/app/app.component.ts
  25. 24
      productFE/src/app/app.module.ts
  26. 0
      productFE/src/app/component/catalog/catalog.component.css
  27. 199
      productFE/src/app/component/catalog/catalog.component.html
  28. 25
      productFE/src/app/component/catalog/catalog.component.spec.ts
  29. 43
      productFE/src/app/component/catalog/catalog.component.ts
  30. 0
      productFE/src/app/component/product/product.component.css
  31. 210
      productFE/src/app/component/product/product.component.html
  32. 25
      productFE/src/app/component/product/product.component.spec.ts
  33. 32
      productFE/src/app/component/product/product.component.ts
  34. 11
      productFE/src/app/model/product.model.ts
  35. 16
      productFE/src/app/service/product.service.spec.ts
  36. 41
      productFE/src/app/service/product.service.ts
  37. 0
      productFE/src/assets/.gitkeep
  38. 5
      productFE/src/assets/css/all.min.css
  39. 10154
      productFE/src/assets/css/bootstrap.css
  40. 84
      productFE/src/assets/css/responsive.css
  41. 1418
      productFE/src/assets/css/ui.css
  42. BIN
      productFE/src/assets/images/items/1.jpg
  43. BIN
      productFE/src/assets/images/items/2.jpg
  44. BIN
      productFE/src/assets/images/items/3.jpg
  45. BIN
      productFE/src/assets/images/items/4.jpg
  46. BIN
      productFE/src/assets/images/items/5.jpg
  47. BIN
      productFE/src/assets/images/items/6.jpg
  48. BIN
      productFE/src/assets/images/items/7.jpg
  49. BIN
      productFE/src/assets/images/items/9.jpg
  50. BIN
      productFE/src/assets/images/items/amd.jpg
  51. BIN
      productFE/src/assets/images/items/bat.jpg
  52. BIN
      productFE/src/assets/images/items/football.jpg
  53. BIN
      productFE/src/assets/images/items/hoodie.jpg
  54. BIN
      productFE/src/assets/images/items/nokia.jpg
  55. BIN
      productFE/src/assets/images/items/pendrive.jpg
  56. BIN
      productFE/src/assets/images/items/ps5.jpg
  57. BIN
      productFE/src/assets/images/items/sonyHeadphones.jpg
  58. BIN
      productFE/src/assets/images/items/tshirt.jpg
  59. BIN
      productFE/src/assets/images/items/yonex.jpg
  60. 7
      productFE/src/assets/js/bootstrap.bundle.min.js
  61. 2
      productFE/src/assets/js/jquery.min.js
  62. BIN
      productFE/src/assets/webfonts/fa-brands-400.ttf
  63. BIN
      productFE/src/assets/webfonts/fa-brands-400.woff
  64. BIN
      productFE/src/assets/webfonts/fa-brands-400.woff2
  65. BIN
      productFE/src/assets/webfonts/fa-solid-900.ttf
  66. BIN
      productFE/src/assets/webfonts/fa-solid-900.woff
  67. BIN
      productFE/src/assets/webfonts/fa-solid-900.woff2
  68. 3
      productFE/src/environments/environment.prod.ts
  69. 16
      productFE/src/environments/environment.ts
  70. BIN
      productFE/src/favicon.ico
  71. 22
      productFE/src/index.html
  72. 12
      productFE/src/main.ts
  73. 65
      productFE/src/polyfills.ts
  74. 1
      productFE/src/styles.css
  75. 25
      productFE/src/test.ts
  76. 32
      productFE/tsconfig.json

221
Product.postman_collection.json

@ -1,221 +0,0 @@
{
"info": {
"_postman_id": "7b41b3fe-ce7b-4d5b-81d3-4bba34d9bbf6",
"name": "Product",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Post product",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"productNameTen\",\r\n \"picture\": \"pictureTen\",\r\n \"price\": 2223,\r\n \"rating\": 2.4,\r\n \"vendorName\": \"vendorTwo\",\r\n \"category\": \"categoryOne\",\r\n \"description\": \"descriptionTen\",\r\n \"quantity\": 72\r\n }",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:59326/product",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product"
]
}
},
"response": []
},
{
"name": "Post many products",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "[\r\n {\r\n \"name\": \"productNameTwo\",\r\n \"picture\": \"pictureTwo\",\r\n \"price\": 100,\r\n \"rating\": 4.9,\r\n \"vendorName\": \"vendorTwo\",\r\n \"category\": \"categoryTwo\",\r\n \"description\": \"descriptionTwo\",\r\n \"quantity\": 15\r\n },\r\n {\r\n \"name\": \"productNameThree\",\r\n \"picture\": \"pictureThree\",\r\n \"price\": 159,\r\n \"rating\": 0.1,\r\n \"vendorName\": \"vendorThree\",\r\n \"category\": \"categoryThree\",\r\n \"description\": \"descriptionThree\",\r\n \"quantity\": 99\r\n },\r\n {\r\n \"name\": \"productNameFour\",\r\n \"picture\": \"pictureFour\",\r\n \"price\": 1111,\r\n \"rating\": 5.0,\r\n \"vendorName\": \"vendorFour\",\r\n \"category\": \"categoryFour\",\r\n \"description\": \"descriptionFour\",\r\n \"quantity\": 22\r\n },\r\n {\r\n \"name\": \"productNameFive\",\r\n \"picture\": \"pictureFive\",\r\n \"price\": 1,\r\n \"rating\": 3.0,\r\n \"vendorName\": \"vendorFive\",\r\n \"category\": \"categoryOne\",\r\n \"description\": \"descriptionFive\",\r\n \"quantity\": 13\r\n },\r\n {\r\n \"name\": \"productNameSix\",\r\n \"picture\": \"pictureSix\",\r\n \"price\": 22,\r\n \"rating\": 3.6,\r\n \"vendorName\": \"vendorTwo\",\r\n \"category\": \"categoryThree\",\r\n \"description\": \"descriptionSix\",\r\n \"quantity\": 15\r\n },\r\n {\r\n \"name\": \"productNameSeven\",\r\n \"picture\": \"pictureSeven\",\r\n \"price\": 1511,\r\n \"rating\": 4.2,\r\n \"vendorName\": \"vendorFour\",\r\n \"category\": \"categoryFour\",\r\n \"description\": \"descriptionSeven\",\r\n \"quantity\": 31\r\n },\r\n {\r\n \"name\": \"productNameEight\",\r\n \"picture\": \"pictureEight\",\r\n \"price\": 132,\r\n \"rating\": 2.4,\r\n \"vendorName\": \"vendorOne\",\r\n \"category\": \"categoryOne\",\r\n \"description\": \"descriptionEight\",\r\n \"quantity\": 69\r\n },\r\n {\r\n \"name\": \"productNameNine\",\r\n \"picture\": \"pictureNine\",\r\n \"price\": 443,\r\n \"rating\": 3.4,\r\n \"vendorName\": \"vendorTwo\",\r\n \"category\": \"categoryThree\",\r\n \"description\": \"descriptionNine\",\r\n \"quantity\": 70\r\n },\r\n {\r\n \"name\": \"productNameTen\",\r\n \"picture\": \"pictureTen\",\r\n \"price\": 2223,\r\n \"rating\": 2.4,\r\n \"vendorName\": \"vendorTwo\",\r\n \"category\": \"categoryOne\",\r\n \"description\": \"descriptionTen\",\r\n \"quantity\": 72\r\n }\r\n]\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:59326/products",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"products"
]
}
},
"response": []
},
{
"name": "Get all products",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:59326/product",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product"
]
}
},
"response": []
},
{
"name": "Get product by id",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:59326/product/3",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product",
"3"
]
}
},
"response": []
},
{
"name": "Update Product",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"ProductNameTen\",\r\n \"picture\": \"pictureTen\",\r\n \"price\": 2223,\r\n \"rating\": 2.4,\r\n \"vendorName\": \"vendorTwo\",\r\n \"category\": \"categoryOne\",\r\n \"description\": \"descriptionTen\",\r\n \"quantity\": 72\r\n }",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:59326/product/10",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product",
"10"
]
}
},
"response": []
},
{
"name": "Delete product by id",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:59326/product/10",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product",
"10"
]
}
},
"response": []
},
{
"name": "get products by category",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:59326/product/category/categoryOne",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product",
"category",
"categoryOne"
]
}
},
"response": []
},
{
"name": "Get product quantity",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:59326/product/quantity/3",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product",
"quantity",
"3"
]
}
},
"response": []
},
{
"name": "Product search",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:59326/product/search?q=productNamet",
"protocol": "http",
"host": [
"localhost"
],
"port": "59326",
"path": [
"product",
"search"
],
"query": [
{
"key": "q",
"value": "productNamet"
}
]
}
},
"response": []
}
]
}

102
insertProds.txt

@ -0,0 +1,102 @@
[
{
"name":"SONY ZX110AP Wired Headset",
"picture":"assets/images/items/sonyHeadphones.jpg",
"price":1199,
"rating":4.5,
"vendorName":"Corseco pvt ltd.",
"category":"Electronics",
"description":"Black, On the Ear. With Mic:Yes. Connector type: 3.5 mm",
"quantity":10
},
{
"name": "FastColors Hoodie",
"picture": "assets/images/items/hoodie.jpg",
"price": 100,
"rating": 4.9,
"vendorName": "Fast Colors",
"category": "Clothes",
"description": "FastColors Printed Men Hooded Neck White, Red T-Shirt",
"quantity": 15
},
{
"name": "YONEX MAVIS 350 Nylon Shuttle",
"picture": "assets/images/items/yonex.jpg",
"price": 899,
"rating": 0.1,
"vendorName": "RetailNet",
"category": "Sports",
"description": "Nylon Shuttle - Yellow (Slow, 75, Pack of 6)",
"quantity": 99
},
{
"name": "HP Pen Drive 64 GB",
"picture": "assets/images/items/pendrive.jpg",
"price": 1111,
"rating": 5.0,
"vendorName": "SelectOne",
"category": "Electronics",
"description": "64 GB Pen Drive (Silver)",
"quantity": 22
},
{
"name": "Nokia TA-1010/105",
"picture": "assets/images/items/nokia.jpg",
"price": 1899,
"rating": 3.0,
"vendorName": "Allgain",
"category": "Electronics",
"description": "Black. 4GB Internal. 2G. 1GB RAM.",
"quantity": 13
},
{
"name": "NIVIA Storm Football - Size: 5",
"picture": "assets/images/items/football.jpg",
"price": 379,
"rating": 3.6,
"vendorName": "RetailNet",
"category": "Sports",
"description": "Pack of 1, Multicolor, Rubber Molded.",
"quantity": 15
},
{
"name": "Women's Round Neck T-Shirt",
"picture": "assets/images/items/tshirt.jpg",
"price": 355,
"rating": 4.2,
"vendorName": "Girls Shopee",
"category": "Clothes",
"description": "Round Neck Blue, White T-Shirt",
"quantity": 31
},
{
"name": "AMD Ryzen 7 5800X",
"picture": "assets/images/items/amd.jpg",
"price": 40255
"rating": 4.4,
"vendorName": "RetailNet",
"category": "Electronics",
"description": "3.8 GHz Upto 4.7 GHz AM4 Socket 8 Cores 16 Threads Desktop Processor (Silver)",
"quantity": 69
},
{
"name": "CEAT Cricket Bat",
"picture": "assets/images/items/bat.jpg",
"price": 305,
"rating": 3.4,
"vendorName": "LINOX",
"category": "Sports",
"description": "Bat Grade: Grade 3, Weight Range 0.900 kg",
"quantity": 70
},
{
"name": "Sony PlayStation 5",
"picture": "assets/images/items/ps5.jpg",
"price": 49999,
"rating": 4.9,
"vendorName": "RetailNet",
"category": "Electronics",
"description": "Standard Edition. 825 GB with Astro's Playroom (White)",
"quantity": 72
}
]

product/.gitignore → productBE/.gitignore

product/.mvn/wrapper/MavenWrapperDownloader.java → productBE/.mvn/wrapper/MavenWrapperDownloader.java

product/.mvn/wrapper/maven-wrapper.jar → productBE/.mvn/wrapper/maven-wrapper.jar

product/.mvn/wrapper/maven-wrapper.properties → productBE/.mvn/wrapper/maven-wrapper.properties

product/mvnw → productBE/mvnw

product/mvnw.cmd → productBE/mvnw.cmd

product/pom.xml → productBE/pom.xml

product/src/main/java/com/example/londonStore/CorsConfig.java → productBE/src/main/java/com/example/londonStore/CorsConfig.java

product/src/main/java/com/example/londonStore/ProductApplication.java → productBE/src/main/java/com/example/londonStore/ProductApplication.java

product/src/main/java/com/example/londonStore/SecurityConfig.java → productBE/src/main/java/com/example/londonStore/SecurityConfig.java

product/src/main/java/com/example/londonStore/controller/ProductController.java → productBE/src/main/java/com/example/londonStore/controller/ProductController.java

@ -2,15 +2,14 @@ package com.example.londonStore.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@ -18,7 +17,7 @@ import com.example.londonStore.model.Product;
import com.example.londonStore.service.ProductService;
@RestController
@CrossOrigin(origins = "http://localhost:4200", methods = {RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE})
//@CrossOrigin(origins = "http://localhost:4300", methods = {RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE})
public class ProductController {
@Autowired
@ -56,7 +55,7 @@ public class ProductController {
return productService.getProductById(id);
}
@GetMapping("/product/category/{category}")
@GetMapping("/category/{category}")
private List<Product> getProductsByCategory(@RequestParam(name="page", required = false, defaultValue = "0") Integer page,
@RequestParam(name="size", required = false, defaultValue = "100000") Integer size, @PathVariable("category") String category){
return productService.getProductsByCategory(page, size, category);

product/src/main/java/com/example/londonStore/model/Product.java → productBE/src/main/java/com/example/londonStore/model/Product.java

product/src/main/java/com/example/londonStore/repository/ProductRepository.java → productBE/src/main/java/com/example/londonStore/repository/ProductRepository.java

product/src/main/java/com/example/londonStore/service/ProductService.java → productBE/src/main/java/com/example/londonStore/service/ProductService.java

product/src/main/resources/application.properties → productBE/src/main/resources/application.properties

@ -1,7 +1,7 @@
server.port = 59326
server.port = 59327
spring.datasource.url=jdbc:mysql://localhost:3306/productCatalog?createDatabaseIfNotExist=true
server.servlet.context-path=/apiProduct
spring.datasource.url=jdbc:mysql://localhost:3306/LondonStoreDB?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=Password123
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

product/src/test/java/com/example/londonStore/ProductApplicationTests.java → productBE/src/test/java/com/example/londonStore/ProductApplicationTests.java

6
productFE/proxy.conf.json

@ -0,0 +1,6 @@
{
"/apiProduct/*": {
"target": "http://localhost:59327",
"secure": false
}
}

16
productFE/src/app/app-routing.module.ts

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CatalogComponent } from './component/catalog/catalog.component';
import { ProductComponent } from './component/product/product.component';
const routes: Routes = [
{path: 'product/:pid', component: ProductComponent},
{path: 'catalog/:cname', component: CatalogComponent},
{path: 'catalog', component: CatalogComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

0
productFE/src/app/app.component.css

2
productFE/src/app/app.component.html

@ -0,0 +1,2 @@
<router-outlet></router-outlet>

35
productFE/src/app/app.component.spec.ts

@ -0,0 +1,35 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'prod'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('prod');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('prod app is running!');
});
});

10
productFE/src/app/app.component.ts

@ -0,0 +1,10 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'prod';
}

24
productFE/src/app/app.module.ts

@ -0,0 +1,24 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ProductComponent } from './component/product/product.component';
import { CatalogComponent } from './component/catalog/catalog.component';
@NgModule({
declarations: [
AppComponent,
ProductComponent,
CatalogComponent
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

0
productFE/src/app/component/catalog/catalog.component.css

199
productFE/src/app/component/catalog/catalog.component.html

@ -0,0 +1,199 @@
<header class="section-header">
<section class="header-main border-bottom">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-2 col-4">
<a href="#" class="brand-wrap">
LONDON STORE
</a> <!-- brand-wrap.// -->
</div>
<div class="col-lg-6 col-sm-12">
<form action="/catalog" class="search">
<div class="input-group w-100">
<input type="text" class="form-control" placeholder="Search" name="search">
<div class="input-group-append">
<button class="btn btn-primary" type="submit">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</form> <!-- search-wrap .end// -->
</div> <!-- col.// -->
<div class="col-lg-4 col-sm-6 col-12">
<div class="widgets-wrap float-md-right">
<div class="widget-header mr-3">
<a href="#" class="icon icon-sm rounded-circle border"><i class="fa fa-shopping-cart"></i></a>
<span class="badge badge-pill badge-danger notify">0</span>
</div>
<div class="widget-header icontext">
<a href="#" class="icon icon-sm rounded-circle border"><i class="fa fa-user"></i></a>
<div class="text">
<span class="text-muted">Welcome!</span>
<div>
<a href="#">Sign in</a> |
<a href="#"> Register</a>
</div>
</div>
</div>
</div> <!-- widgets-wrap.// -->
</div> <!-- col.// -->
</div> <!-- row.// -->
</div> <!-- container.// -->
</section> <!-- header-main .// -->
</header> <!-- section-header.// -->
<!-- ========================= SECTION PAGETOP ========================= -->
<section class="section-pagetop bg">
<div class="container">
<h2 class="title-page" *ngIf="query==undefined; else elseBlock">Category products</h2>
<ng-template #elseBlock><h2 class="title-page">Search Results</h2></ng-template>
<nav>
<ol class="breadcrumb text-white">
<li class="breadcrumb-item"><a href="/home">Home</a></li>
</ol>
</nav>
</div> <!-- container // -->
</section>
<!-- ========================= SECTION INTRO END// ========================= -->
<!-- ========================= SECTION CONTENT ========================= -->
<section class="section-content padding-y">
<div class="container">
<div class="row">
<aside class="col-md-3">
<div class="card">
<article class="filter-group">
<header class="card-header">
<a href="#" data-toggle="collapse" data-target="#collapse_1" aria-expanded="true" class="">
<i class="icon-control fa fa-chevron-down"></i>
<h6 class="title">Other categories</h6>
</a>
</header>
<div class="filter-content collapse show" id="collapse_1">
<div class="card-body">
<ul class="list-menu">
<li *ngIf="cname!='Electronics';"><a href="catalog/Electronics">Electronics</a></li>
<li *ngIf="cname!='Clothes';"><a href="catalog/Clothes">Clothes</a></li>
<li *ngIf="cname!='Sports';"><a href="catalog/Sports">Sports</a></li>
</ul>
</div> <!-- card-body.// -->
</div>
</article> <!-- filter-group .// -->
</div> <!-- card.// -->
</aside> <!-- col.// -->
<main class="col-md-9">
<!-- <header class="border-bottom mb-4 pb-3">
<div class="form-inline">
<span class="mr-md-auto">32 Items found </span>
<select class="mr-2 form-control">
<option>Latest items</option>
<option>Trending</option>
<option>Most Popular</option>
<option>Cheapest</option>
</select>
<div class="btn-group">
<a href="#" class="btn btn-outline-secondary" data-toggle="tooltip" title="List view">
<i class="fa fa-bars"></i></a>
<a href="#" class="btn btn-outline-secondary active" data-toggle="tooltip" title="Grid view">
<i class="fa fa-th"></i></a>
</div>
</div>
</header> -->
<div class="row">
<div class="col-md-4" *ngFor='let product of products'>
<figure class="card card-product-grid">
<div class="img-wrap">
<!-- <span class="badge badge-danger"> NEW </span> -->
<img src="{{product.picture}}">
</div> <!-- img-wrap.// -->
<figcaption class="info-wrap">
<div class="fix-height">
<a href="/product/{{product.id}}" class="text-primary">{{product.name}}</a>
<div class="price-wrap mt-2">
<span class="price">₹{{product.price}}</span>&nbsp;
<del class="price-old">₹{{product.price + 100}}</del>
</div> <!-- price-wrap.// -->
<div>Rating: {{product.rating}}/5</div>
</div>
<a href="javascript:void(0);" class="btn btn-block btn-primary" (click)="addToCart(product.id)">Add to Cart </a>
</figcaption>
</figure>
</div> <!-- col.// -->
</div> <!-- row end.// -->
<nav class="mt-4" aria-label="Page navigation sample">
<ul class="pagination">
<li class="page-item disabled"><a class="page-link" href="#">Previous</a></li>
<li class="page-item active"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Next</a></li>
</ul>
</nav>
</main> <!-- col.// -->
</div>
</div> <!-- container .// -->
</section>
<!-- ========================= SECTION CONTENT END// ========================= -->
<!-- ========================= FOOTER ========================= -->
<footer class="section-footer border-top padding-y">
<div class="container">
<p class="float-md-right">
&copy; Copyright 2021 All rights reserved
</p>
<p>
<a href="#">Terms and conditions</a>
</p>
</div><!-- //container -->
</footer>
<!-- ========================= FOOTER END // ========================= -->
<!-- <form action="/catalog">
<input type="text" placeholder="Search.." name="search">
<button type="submit">Submit</button>
</form>
<div *ngFor = 'let product of products'>
Name: {{product?.name}}&nbsp;&nbsp;
Picture: {{product?.picture}}&nbsp;&nbsp;
Price: {{product?.price}}&nbsp;&nbsp;
Rating: {{product?.rating}}&nbsp;&nbsp;
Vendor Name: {{product?.vendorName}}&nbsp;&nbsp;
Category: {{product?.category}}&nbsp;&nbsp;
Description: {{product?.description}}&nbsp;&nbsp;
Quantity: {{product?.quantity}}&nbsp;&nbsp;
&nbsp;&nbsp;<a routerLink="/product/{{product.id}}">VIEW PRODUCT</a>
<br><br><br>
</div> -->

25
productFE/src/app/component/catalog/catalog.component.spec.ts

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CatalogComponent } from './catalog.component';
describe('CatalogComponent', () => {
let component: CatalogComponent;
let fixture: ComponentFixture<CatalogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ CatalogComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(CatalogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

43
productFE/src/app/component/catalog/catalog.component.ts

@ -0,0 +1,43 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Product } from 'src/app/model/product.model';
import { ProductService } from 'src/app/service/product.service';
import { filter } from 'rxjs/operators';
@Component({
selector: 'app-catalog',
templateUrl: './catalog.component.html',
styleUrls: ['./catalog.component.css']
})
export class CatalogComponent implements OnInit {
products: Product[];
cname: string;
query : string;
constructor(private actRoute : ActivatedRoute, private productService : ProductService) { }
ngOnInit(): void {
this.products =[];
this.cname = undefined;
this.query = undefined;
this.actRoute.paramMap.subscribe(params => {this.cname = params.get('cname')});
this.actRoute.queryParams.pipe(filter(params => params.search)).subscribe(params => {
console.log(params);
this.query = params.search;
}
);
this.productService.searchProducts(this.query).subscribe(data =>{
if(this.query != undefined){this.products = data;}
});
this.productService.getAllProductsByCategory(this.cname).subscribe(data => {
if(this.cname != undefined){this.products = data;}
});
}
public addToCart(id: number){
this.productService.addItemToCart(id);
}
}

0
productFE/src/app/component/product/product.component.css

210
productFE/src/app/component/product/product.component.html

@ -0,0 +1,210 @@
<header class="section-header">
<section class="header-main border-bottom">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-2 col-4">
<a href="#" class="brand-wrap">LONDON STORE</a>
</div>
<div class="col-lg-6 col-sm-12">
<form action="/catalog" class="search">
<div class="input-group w-100">
<input type="text" class="form-control" placeholder="Search">
<div class="input-group-append">
<button class="btn btn-primary" type="submit">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</form> <!-- search-wrap .end// -->
</div> <!-- col.// -->
<div class="col-lg-4 col-sm-6 col-12">
<div class="widgets-wrap float-md-right">
<div class="widget-header mr-3">
<a href="#" class="icon icon-sm rounded-circle border"><i class="fa fa-shopping-cart"></i></a>
<span class="badge badge-pill badge-danger notify">0</span>
</div>
<div class="widget-header icontext">
<a href="#" class="icon icon-sm rounded-circle border"><i class="fa fa-user"></i></a>
<div class="text">
<span class="text-muted">Welcome!</span>
<div>
<a href="#">Sign in</a> |
<a href="#"> Register</a>
</div>
</div>
</div>
</div> <!-- widgets-wrap.// -->
</div> <!-- col.// -->
</div> <!-- row.// -->
</div> <!-- container.// -->
</section> <!-- header-main .// -->
</header> <!-- section-header.// -->
<!-- ========================= SECTION CONTENT ========================= -->
<section class="section-content padding-y bg">
<div class="container">
<article class="card">
<div class="card-body">
<div class="row">
<aside class="col-md-6">
<article class="gallery-wrap">
<div class="card img-big-wrap">
<a href="#"> <img src="{{product.picture}}"></a>
</div> <!-- card img-big-wrap.// -->
</article> <!-- gallery-wrap .end// -->
</aside>
<main class="col-md-6">
<article>
<a href="/catalog/{{product.category}}" class="text-primary btn-link">{{product.category}}</a>
<h3 class="title">{{product.name}}</h3>
<div>
<ul class="rating-stars">
<li class="stars-active">
<i class="fa fa-star"></i> <i class="fa fa-star"></i>
<i class="fa fa-star"></i>
</li>
<li>
<i class="fa fa-star"></i> <i class="fa fa-star"></i>
<i class="fa fa-star"></i> <i class="fa fa-star"></i>
<i class="fa fa-star"></i>
</li>
</ul>
<span class="label-rating mr-3 text-muted">{{product.rating}}/5</span>
<!-- <a href="#" class="btn-link mr-3 text-muted"> <i class="fa fa-heart"></i> Save for later </a>
<a href="#" class="btn-link text-muted"> <i class="fa fa-book-open"></i> Compare </a> -->
</div>
<hr>
<div class="mb-3">
<h6>Description</h6>
<ul class="list-dots mb-0">
<li>{{product.description}}</li>
<li>Description Line Two </li>
<li>Description Line Three</li>
<li>Description Line Four</li>
</ul>
</div>
<div class="mb-3">
<h6>Vendor Name</h6>
<ul class="list-dots mb-0">
<li>{{product.vendorName}}</li>
</ul>
</div>
<!-- <div class="form-group">
<label class="text-muted">Available sizes</label>
<div>
<label class="js-check btn btn-check active mr-1">
<input type="radio" name="option_size" value="option1" checked="">
<span>Small</span>
</label>
<label class="js-check btn btn-check mr-1">
<input type="radio" name="option_size" value="option1">
<span>Medium</span>
</label>
<label class="js-check btn btn-check mr-1">
<input type="radio" name="option_size" value="option1">
<span>Large</span>
</label>
<label class="js-check btn btn-check disabled">
<input type="radio" name="option_size" disabled="" value="option1">
<span>Babies</span>
</label>
</div>
</div> -->
<div class="mb-3">
<var class="price h4">₹{{product.price}}</var> <br>
<del class="price-old">₹{{product.price + 100}}</del>
</div> <!-- price-detail-wrap .// -->
<div class="mb-4">
<a href="javascript:void(0);" class="btn btn-primary mr-1" (click)="addToCart(product.id)">Add to Cart</a>
</div>
</article> <!-- product-info-aside .// -->
</main> <!-- col.// -->
</div> <!-- row.// -->
</div> <!-- card-body.// -->
</article>
<!-- <article class="card mt-5">
<div class="card-body">
<div class="row">
<aside class="col-md-6">
<h5>Parameters</h5>
<dl class="row">
<dt class="col-sm-3">Display</dt>
<dd class="col-sm-9">13.3-inch LED-backlit display with IPS</dd>
<dt class="col-sm-3">Processor</dt>
<dd class="col-sm-9">2.3GHz dual-core Intel Core i5</dd>
<dt class="col-sm-3">Camera</dt>
<dd class="col-sm-9">720p FaceTime HD camera</dd>
<dt class="col-sm-3">Memory</dt>
<dd class="col-sm-9">8 GB RAM or 16 GB RAM</dd>
<dt class="col-sm-3">Graphics</dt>
<dd class="col-sm-9">Intel Iris Plus Graphics 640</dd>
</dl>
</aside>
<aside class="col-md-6">
<h5>Features</h5>
<ul class="list-check">
<li>Best performance of battery</li>
<li>5 years warranty for this product</li>
<li>Amazing features and high quality</li>
<li>Best performance of battery</li>
<li>5 years warranty for this product</li>
</ul>
</aside>
</div> <!-- row.// -->
<!-- <hr>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</article> -->
</div>
</section>
<!-- ========================= SECTION CONTENT END// ========================= -->
<!-- ========================= FOOTER ========================= -->
<footer class="section-footer border-top padding-y">
<div class="container">
<p class="float-md-right">
&copy; Copyright 2021 All rights reserved
</p>
<p>
<a href="#">Terms and conditions</a>
</p>
</div><!-- //container -->
</footer>
<!-- ========================= FOOTER END // ========================= -->
<!-- <div>Name: {{product?.name}}</div>
<div>Picture: {{product?.picture}}</div>
<div>Price: {{product?.price}}</div>
<div>Rating: {{product?.rating}}</div>
<div>Vendor Name: {{product?.vendorName}}</div>
<div>Category: {{product?.category}}</div>
<div>Description: {{product?.description}}</div>
<div>Quantity: {{product?.quantity}}</div> -->

25
productFE/src/app/component/product/product.component.spec.ts

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ProductComponent } from './product.component';
describe('ProductComponent', () => {
let component: ProductComponent;
let fixture: ComponentFixture<ProductComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ProductComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ProductComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

32
productFE/src/app/component/product/product.component.ts

@ -0,0 +1,32 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Product } from 'src/app/model/product.model';
import { ProductService } from 'src/app/service/product.service';
@Component({
selector: 'app-product',
templateUrl: './product.component.html',
styleUrls: ['./product.component.css']
})
export class ProductComponent implements OnInit {
product : Product;
pid : string;
constructor(private actRoute : ActivatedRoute, private productService : ProductService) {
}
ngOnInit(): void {
this.actRoute.paramMap.subscribe(params => {this.pid = params.get('pid')});
this.productService.getProductDetails(this.pid).subscribe(data => {
this.product = data;
});
}
public addToCart(id: number){
this.productService.addItemToCart(id);
}
}

11
productFE/src/app/model/product.model.ts

@ -0,0 +1,11 @@
export class Product{
id : number;
name : string;
picture : string;
price : number;
rating : number;
vendorName : string;
category : string;
description : string;
quantity : number;
}

16
productFE/src/app/service/product.service.spec.ts

@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { ProductService } from './product.service';
describe('ProductService', () => {
let service: ProductService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ProductService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

41
productFE/src/app/service/product.service.ts

@ -0,0 +1,41 @@
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { EMPTY } from 'rxjs'
import { Product } from '../model/product.model';
@Injectable({
providedIn: 'root'
})
export class ProductService {
path : string = "http://localhost:4300/apiProduct";
cartPath : string = "http://localhost:4300/apiCart";
constructor(private httpClient: HttpClient) { }
public getProductDetails(id : string){
let product_get_url = this.path + '/product/' + id;
console.log(id);
return this.httpClient.get<Product>(product_get_url);
}
public getAllProductsByCategory(id: string){
if(id == undefined){return EMPTY;}
let category_get_url = this.path + '/category/' + id;
return this.httpClient.get<Product[]>(category_get_url);
}
public searchProducts(query: string){
if(query == undefined){return EMPTY;}
let search_get_url = this.path + '/product/search';
return this.httpClient.get<Product[]>(search_get_url, {
params: new HttpParams().set('q', query)
});
}
public addItemToCart(id: number){
let cart_get_url = this.cartPath + '/product/' + id;
console.log(id);
this.httpClient.post<any>(cart_get_url, null);
}
}

0
productFE/src/assets/.gitkeep

5
productFE/src/assets/css/all.min.css
File diff suppressed because it is too large
View File

10154
productFE/src/assets/css/bootstrap.css
File diff suppressed because it is too large
View File

84
productFE/src/assets/css/responsive.css

@ -0,0 +1,84 @@
.mobile-block {
display: none;
}
@media (max-width: 1200px) {
/* tablet devices */
}
@media (max-width: 992px) {
/* small tablet devices */
.slider-main .item-slide {
height: auto;
}
.table-shopping-cart tr td:first-child {
width: 250px;
}
.table-shopping-cart .itemside .info {
padding: 0;
}
.table-shopping-cart .itemside .aside {
display: none;
}
}
@media all and (max-width: 768px) {
/* mobile devices */
.mobile-block {
display: block;
}
.mobile-hide {
display: none;
}
.section-header .logo {
max-height: 40px;
width: auto;
}
.section-header .header-main .brand-wrap {
margin-bottom: 1rem;
display: inline-block;
}
.section-header .header-main .search {
margin-bottom: 1rem;
}
.item-feature {
margin-bottom: 20px;
}
.mobile-order-first {
order: -1;
}
.mobile-order-1 {
order: 1;
}
.mobile-order-2 {
order: 2;
}
.mobile-order-3 {
order: 3;
}
.mobile-py {
padding-top: 20px;
padding-bottom: 20px;
}
.mobile-pb {
padding-bottom: 20px;
}
.mobile-pt {
padding-top: 20px;
}
.navbar-expand .navbar-collapse {
flex-direction: column;
}
}
/*# sourceMappingURL=responsive.css.map */

1418
productFE/src/assets/css/ui.css
File diff suppressed because it is too large
View File

BIN
productFE/src/assets/images/items/1.jpg

Before After
Width: 480  |  Height: 480  |  Size: 37 KiB

BIN
productFE/src/assets/images/items/2.jpg

Before After
Width: 481  |  Height: 480  |  Size: 34 KiB

BIN
productFE/src/assets/images/items/3.jpg

Before After
Width: 481  |  Height: 480  |  Size: 49 KiB

BIN
productFE/src/assets/images/items/4.jpg

Before After
Width: 481  |  Height: 480  |  Size: 28 KiB

BIN
productFE/src/assets/images/items/5.jpg

Before After
Width: 480  |  Height: 480  |  Size: 13 KiB

BIN
productFE/src/assets/images/items/6.jpg

Before After
Width: 480  |  Height: 480  |  Size: 26 KiB

BIN
productFE/src/assets/images/items/7.jpg

Before After
Width: 480  |  Height: 480  |  Size: 26 KiB

BIN
productFE/src/assets/images/items/9.jpg

Before After
Width: 480  |  Height: 480  |  Size: 21 KiB

BIN
productFE/src/assets/images/items/amd.jpg

Before After
Width: 242  |  Height: 208  |  Size: 4.6 KiB

BIN
productFE/src/assets/images/items/bat.jpg

Before After
Width: 211  |  Height: 239  |  Size: 5.9 KiB

BIN
productFE/src/assets/images/items/football.jpg

Before After
Width: 223  |  Height: 226  |  Size: 9.2 KiB

BIN
productFE/src/assets/images/items/hoodie.jpg

Before After
Width: 201  |  Height: 251  |  Size: 6.4 KiB

BIN
productFE/src/assets/images/items/nokia.jpg

Before After
Width: 225  |  Height: 225  |  Size: 4.9 KiB

BIN
productFE/src/assets/images/items/pendrive.jpg

Before After
Width: 225  |  Height: 225  |  Size: 4.2 KiB

BIN
productFE/src/assets/images/items/ps5.jpg

Before After
Width: 202  |  Height: 249  |  Size: 4.4 KiB

BIN
productFE/src/assets/images/items/sonyHeadphones.jpg

Before After
Width: 896  |  Height: 1128  |  Size: 69 KiB

BIN
productFE/src/assets/images/items/tshirt.jpg

Before After
Width: 191  |  Height: 264  |  Size: 4.4 KiB

BIN
productFE/src/assets/images/items/yonex.jpg

Before After
Width: 203  |  Height: 248  |  Size: 5.5 KiB

7
productFE/src/assets/js/bootstrap.bundle.min.js
File diff suppressed because it is too large
View File

2
productFE/src/assets/js/jquery.min.js
File diff suppressed because it is too large
View File

BIN
productFE/src/assets/webfonts/fa-brands-400.ttf

BIN
productFE/src/assets/webfonts/fa-brands-400.woff

BIN
productFE/src/assets/webfonts/fa-brands-400.woff2

BIN
productFE/src/assets/webfonts/fa-solid-900.ttf

BIN
productFE/src/assets/webfonts/fa-solid-900.woff

BIN
productFE/src/assets/webfonts/fa-solid-900.woff2

3
productFE/src/environments/environment.prod.ts

@ -0,0 +1,3 @@
export const environment = {
production: true
};

16
productFE/src/environments/environment.ts

@ -0,0 +1,16 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

BIN
productFE/src/favicon.ico

Before After
Width: 28  |  Height: 30  |  Size: 948 B

22
productFE/src/index.html

@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Prod</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<!-- Custom styles for this template -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/ui.css" rel="stylesheet">
<link href="assets/css/responsive.css" rel="stylesheet">
<link href="assets/css/all.min.css" rel="stylesheet">
<script src="assets/js/jquery.min.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.bundle.min.js" type="text/javascript"></script>
</head>
<body>
<app-root></app-root>
</body>
</html>

12
productFE/src/main.ts

@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

65
productFE/src/polyfills.ts

@ -0,0 +1,65 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/**
* IE11 requires the following for NgClass support on SVG elements
*/
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

1
productFE/src/styles.css

@ -0,0 +1 @@
/* You can add global styles to this file, and also import other style files */

25
productFE/src/test.ts

@ -0,0 +1,25 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

32
productFE/tsconfig.json

@ -0,0 +1,32 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"strictPropertyInitialization": false,
"strictNullChecks":false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
Loading…
Cancel
Save