76 changed files with 12649 additions and 228 deletions
Split View
Diff Options
-
221Product.postman_collection.json
-
102insertProds.txt
-
0productBE/.gitignore
-
0productBE/.mvn/wrapper/MavenWrapperDownloader.java
-
0productBE/.mvn/wrapper/maven-wrapper.jar
-
0productBE/.mvn/wrapper/maven-wrapper.properties
-
0productBE/mvnw
-
0productBE/mvnw.cmd
-
0productBE/pom.xml
-
0productBE/src/main/java/com/example/londonStore/CorsConfig.java
-
0productBE/src/main/java/com/example/londonStore/ProductApplication.java
-
0productBE/src/main/java/com/example/londonStore/SecurityConfig.java
-
7productBE/src/main/java/com/example/londonStore/controller/ProductController.java
-
0productBE/src/main/java/com/example/londonStore/model/Product.java
-
0productBE/src/main/java/com/example/londonStore/repository/ProductRepository.java
-
0productBE/src/main/java/com/example/londonStore/service/ProductService.java
-
6productBE/src/main/resources/application.properties
-
0productBE/src/test/java/com/example/londonStore/ProductApplicationTests.java
-
6productFE/proxy.conf.json
-
16productFE/src/app/app-routing.module.ts
-
0productFE/src/app/app.component.css
-
2productFE/src/app/app.component.html
-
35productFE/src/app/app.component.spec.ts
-
10productFE/src/app/app.component.ts
-
24productFE/src/app/app.module.ts
-
0productFE/src/app/component/catalog/catalog.component.css
-
199productFE/src/app/component/catalog/catalog.component.html
-
25productFE/src/app/component/catalog/catalog.component.spec.ts
-
43productFE/src/app/component/catalog/catalog.component.ts
-
0productFE/src/app/component/product/product.component.css
-
210productFE/src/app/component/product/product.component.html
-
25productFE/src/app/component/product/product.component.spec.ts
-
32productFE/src/app/component/product/product.component.ts
-
11productFE/src/app/model/product.model.ts
-
16productFE/src/app/service/product.service.spec.ts
-
41productFE/src/app/service/product.service.ts
-
0productFE/src/assets/.gitkeep
-
5productFE/src/assets/css/all.min.css
-
10154productFE/src/assets/css/bootstrap.css
-
84productFE/src/assets/css/responsive.css
-
1418productFE/src/assets/css/ui.css
-
BINproductFE/src/assets/images/items/1.jpg
-
BINproductFE/src/assets/images/items/2.jpg
-
BINproductFE/src/assets/images/items/3.jpg
-
BINproductFE/src/assets/images/items/4.jpg
-
BINproductFE/src/assets/images/items/5.jpg
-
BINproductFE/src/assets/images/items/6.jpg
-
BINproductFE/src/assets/images/items/7.jpg
-
BINproductFE/src/assets/images/items/9.jpg
-
BINproductFE/src/assets/images/items/amd.jpg
-
BINproductFE/src/assets/images/items/bat.jpg
-
BINproductFE/src/assets/images/items/football.jpg
-
BINproductFE/src/assets/images/items/hoodie.jpg
-
BINproductFE/src/assets/images/items/nokia.jpg
-
BINproductFE/src/assets/images/items/pendrive.jpg
-
BINproductFE/src/assets/images/items/ps5.jpg
-
BINproductFE/src/assets/images/items/sonyHeadphones.jpg
-
BINproductFE/src/assets/images/items/tshirt.jpg
-
BINproductFE/src/assets/images/items/yonex.jpg
-
7productFE/src/assets/js/bootstrap.bundle.min.js
-
2productFE/src/assets/js/jquery.min.js
-
BINproductFE/src/assets/webfonts/fa-brands-400.ttf
-
BINproductFE/src/assets/webfonts/fa-brands-400.woff
-
BINproductFE/src/assets/webfonts/fa-brands-400.woff2
-
BINproductFE/src/assets/webfonts/fa-solid-900.ttf
-
BINproductFE/src/assets/webfonts/fa-solid-900.woff
-
BINproductFE/src/assets/webfonts/fa-solid-900.woff2
-
3productFE/src/environments/environment.prod.ts
-
16productFE/src/environments/environment.ts
-
BINproductFE/src/favicon.ico
-
22productFE/src/index.html
-
12productFE/src/main.ts
-
65productFE/src/polyfills.ts
-
1productFE/src/styles.css
-
25productFE/src/test.ts
-
32productFE/tsconfig.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": [] |
|||
} |
|||
] |
|||
} |
|||
@ -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 |
|||
} |
|||
] |
|||
@ -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 |
|||
@ -0,0 +1,6 @@ |
|||
{ |
|||
"/apiProduct/*": { |
|||
"target": "http://localhost:59327", |
|||
"secure": false |
|||
} |
|||
} |
|||
@ -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,0 +1,2 @@ |
|||
|
|||
<router-outlet></router-outlet> |
|||
@ -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!'); |
|||
}); |
|||
}); |
|||
@ -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'; |
|||
} |
|||
@ -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,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> |
|||
<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"> |
|||
© 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}} |
|||
Picture: {{product?.picture}} |
|||
Price: {{product?.price}} |
|||
Rating: {{product?.rating}} |
|||
Vendor Name: {{product?.vendorName}} |
|||
Category: {{product?.category}} |
|||
Description: {{product?.description}} |
|||
Quantity: {{product?.quantity}} |
|||
|
|||
<a routerLink="/product/{{product.id}}">VIEW PRODUCT</a> |
|||
<br><br><br> |
|||
</div> --> |
|||
@ -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(); |
|||
}); |
|||
}); |
|||
@ -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,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"> |
|||
© 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> --> |
|||
@ -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(); |
|||
}); |
|||
}); |
|||
@ -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); |
|||
} |
|||
|
|||
} |
|||
@ -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; |
|||
} |
|||
@ -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(); |
|||
}); |
|||
}); |
|||
@ -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); |
|||
} |
|||
} |
|||
5
productFE/src/assets/css/all.min.css
File diff suppressed because it is too large
View File
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
File diff suppressed because it is too large
View File
@ -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
File diff suppressed because it is too large
View File
7
productFE/src/assets/js/bootstrap.bundle.min.js
File diff suppressed because it is too large
View File
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
File diff suppressed because it is too large
View File
@ -0,0 +1,3 @@ |
|||
export const environment = { |
|||
production: true |
|||
}; |
|||
@ -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.
|
|||
@ -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> |
|||
@ -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)); |
|||
@ -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 |
|||
*/ |
|||
@ -0,0 +1 @@ |
|||
/* You can add global styles to this file, and also import other style files */ |
|||
@ -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); |
|||
@ -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 |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue