66 changed files with 13501 additions and 0 deletions
Split View
Diff Options
-
17Angular-UrbanBazaar/.browserslistrc
-
16Angular-UrbanBazaar/.editorconfig
-
45Angular-UrbanBazaar/.gitignore
-
27Angular-UrbanBazaar/README.md
-
106Angular-UrbanBazaar/angular.json
-
44Angular-UrbanBazaar/karma.conf.js
-
12122Angular-UrbanBazaar/package-lock.json
-
39Angular-UrbanBazaar/package.json
-
15Angular-UrbanBazaar/src/app/app-routing.module.ts
-
0Angular-UrbanBazaar/src/app/app.component.css
-
3Angular-UrbanBazaar/src/app/app.component.html
-
35Angular-UrbanBazaar/src/app/app.component.spec.ts
-
10Angular-UrbanBazaar/src/app/app.component.ts
-
30Angular-UrbanBazaar/src/app/app.module.ts
-
99Angular-UrbanBazaar/src/app/components/page-nav-bar/page-nav-bar.component.css
-
72Angular-UrbanBazaar/src/app/components/page-nav-bar/page-nav-bar.component.html
-
25Angular-UrbanBazaar/src/app/components/page-nav-bar/page-nav-bar.component.spec.ts
-
15Angular-UrbanBazaar/src/app/components/page-nav-bar/page-nav-bar.component.ts
-
0Angular-UrbanBazaar/src/app/components/user-add/user-add.component.css
-
1Angular-UrbanBazaar/src/app/components/user-add/user-add.component.html
-
25Angular-UrbanBazaar/src/app/components/user-add/user-add.component.spec.ts
-
15Angular-UrbanBazaar/src/app/components/user-add/user-add.component.ts
-
22Angular-UrbanBazaar/src/app/components/user-profile-details/user-profile-details.component.css
-
36Angular-UrbanBazaar/src/app/components/user-profile-details/user-profile-details.component.html
-
25Angular-UrbanBazaar/src/app/components/user-profile-details/user-profile-details.component.spec.ts
-
39Angular-UrbanBazaar/src/app/components/user-profile-details/user-profile-details.component.ts
-
0Angular-UrbanBazaar/src/app/components/user-search/user-search.component.css
-
1Angular-UrbanBazaar/src/app/components/user-search/user-search.component.html
-
25Angular-UrbanBazaar/src/app/components/user-search/user-search.component.spec.ts
-
15Angular-UrbanBazaar/src/app/components/user-search/user-search.component.ts
-
3Angular-UrbanBazaar/src/app/components/user-show/user-show.component.css
-
29Angular-UrbanBazaar/src/app/components/user-show/user-show.component.html
-
25Angular-UrbanBazaar/src/app/components/user-show/user-show.component.spec.ts
-
22Angular-UrbanBazaar/src/app/components/user-show/user-show.component.ts
-
7Angular-UrbanBazaar/src/app/models/member-user.spec.ts
-
10Angular-UrbanBazaar/src/app/models/member-user.ts
-
7Angular-UrbanBazaar/src/app/models/orders.spec.ts
-
21Angular-UrbanBazaar/src/app/models/orders.ts
-
7Angular-UrbanBazaar/src/app/models/product-category.spec.ts
-
7Angular-UrbanBazaar/src/app/models/product-category.ts
-
7Angular-UrbanBazaar/src/app/models/product.spec.ts
-
13Angular-UrbanBazaar/src/app/models/product.ts
-
7Angular-UrbanBazaar/src/app/models/user.spec.ts
-
15Angular-UrbanBazaar/src/app/models/user.ts
-
16Angular-UrbanBazaar/src/app/services/member-user.service.spec.ts
-
23Angular-UrbanBazaar/src/app/services/member-user.service.ts
-
16Angular-UrbanBazaar/src/app/services/orders.service.spec.ts
-
27Angular-UrbanBazaar/src/app/services/orders.service.ts
-
16Angular-UrbanBazaar/src/app/services/product-category.service.spec.ts
-
18Angular-UrbanBazaar/src/app/services/product-category.service.ts
-
16Angular-UrbanBazaar/src/app/services/product.service.spec.ts
-
22Angular-UrbanBazaar/src/app/services/product.service.ts
-
16Angular-UrbanBazaar/src/app/services/user.service.spec.ts
-
27Angular-UrbanBazaar/src/app/services/user.service.ts
-
0Angular-UrbanBazaar/src/assets/.gitkeep
-
3Angular-UrbanBazaar/src/environments/environment.prod.ts
-
16Angular-UrbanBazaar/src/environments/environment.ts
-
BINAngular-UrbanBazaar/src/favicon.ico
-
14Angular-UrbanBazaar/src/index.html
-
12Angular-UrbanBazaar/src/main.ts
-
65Angular-UrbanBazaar/src/polyfills.ts
-
1Angular-UrbanBazaar/src/styles.css
-
25Angular-UrbanBazaar/src/test.ts
-
15Angular-UrbanBazaar/tsconfig.app.json
-
31Angular-UrbanBazaar/tsconfig.json
-
18Angular-UrbanBazaar/tsconfig.spec.json
@ -0,0 +1,17 @@ |
|||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. |
|||
# For additional information regarding the format and rule options, please see: |
|||
# https://github.com/browserslist/browserslist#queries |
|||
|
|||
# For the full list of supported browsers by the Angular framework, please see: |
|||
# https://angular.io/guide/browser-support |
|||
|
|||
# You can see what browsers were selected by your queries by running: |
|||
# npx browserslist |
|||
|
|||
last 1 Chrome version |
|||
last 1 Firefox version |
|||
last 2 Edge major versions |
|||
last 2 Safari major versions |
|||
last 2 iOS major versions |
|||
Firefox ESR |
|||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. |
|||
@ -0,0 +1,16 @@ |
|||
# Editor configuration, see https://editorconfig.org |
|||
root = true |
|||
|
|||
[*] |
|||
charset = utf-8 |
|||
indent_style = space |
|||
indent_size = 2 |
|||
insert_final_newline = true |
|||
trim_trailing_whitespace = true |
|||
|
|||
[*.ts] |
|||
quote_type = single |
|||
|
|||
[*.md] |
|||
max_line_length = off |
|||
trim_trailing_whitespace = false |
|||
@ -0,0 +1,45 @@ |
|||
# See http://help.github.com/ignore-files/ for more about ignoring files. |
|||
|
|||
# compiled output |
|||
/dist |
|||
/tmp |
|||
/out-tsc |
|||
# Only exists if Bazel was run |
|||
/bazel-out |
|||
|
|||
# dependencies |
|||
/node_modules |
|||
|
|||
# profiling files |
|||
chrome-profiler-events*.json |
|||
|
|||
# IDEs and editors |
|||
/.idea |
|||
.project |
|||
.classpath |
|||
.c9/ |
|||
*.launch |
|||
.settings/ |
|||
*.sublime-workspace |
|||
|
|||
# IDE - VSCode |
|||
.vscode/* |
|||
!.vscode/settings.json |
|||
!.vscode/tasks.json |
|||
!.vscode/launch.json |
|||
!.vscode/extensions.json |
|||
.history/* |
|||
|
|||
# misc |
|||
/.sass-cache |
|||
/connect.lock |
|||
/coverage |
|||
/libpeerconnection.log |
|||
npm-debug.log |
|||
yarn-error.log |
|||
testem.log |
|||
/typings |
|||
|
|||
# System Files |
|||
.DS_Store |
|||
Thumbs.db |
|||
@ -0,0 +1,27 @@ |
|||
# AngularUrbanBazaar |
|||
|
|||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.1.1. |
|||
|
|||
## Development server |
|||
|
|||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. |
|||
|
|||
## Code scaffolding |
|||
|
|||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. |
|||
|
|||
## Build |
|||
|
|||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. |
|||
|
|||
## Running unit tests |
|||
|
|||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). |
|||
|
|||
## Running end-to-end tests |
|||
|
|||
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. |
|||
|
|||
## Further help |
|||
|
|||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. |
|||
@ -0,0 +1,106 @@ |
|||
{ |
|||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", |
|||
"version": 1, |
|||
"newProjectRoot": "projects", |
|||
"projects": { |
|||
"Angular-UrbanBazaar": { |
|||
"projectType": "application", |
|||
"schematics": { |
|||
"@schematics/angular:application": { |
|||
"strict": true |
|||
} |
|||
}, |
|||
"root": "", |
|||
"sourceRoot": "src", |
|||
"prefix": "app", |
|||
"architect": { |
|||
"build": { |
|||
"builder": "@angular-devkit/build-angular:browser", |
|||
"options": { |
|||
"outputPath": "dist/Angular-UrbanBazaar", |
|||
"index": "src/index.html", |
|||
"main": "src/main.ts", |
|||
"polyfills": "src/polyfills.ts", |
|||
"tsConfig": "tsconfig.app.json", |
|||
"assets": [ |
|||
"src/favicon.ico", |
|||
"src/assets" |
|||
], |
|||
"styles": [ |
|||
"src/styles.css" |
|||
], |
|||
"scripts": [] |
|||
}, |
|||
"configurations": { |
|||
"production": { |
|||
"budgets": [ |
|||
{ |
|||
"type": "initial", |
|||
"maximumWarning": "500kb", |
|||
"maximumError": "1mb" |
|||
}, |
|||
{ |
|||
"type": "anyComponentStyle", |
|||
"maximumWarning": "2kb", |
|||
"maximumError": "4kb" |
|||
} |
|||
], |
|||
"fileReplacements": [ |
|||
{ |
|||
"replace": "src/environments/environment.ts", |
|||
"with": "src/environments/environment.prod.ts" |
|||
} |
|||
], |
|||
"outputHashing": "all" |
|||
}, |
|||
"development": { |
|||
"buildOptimizer": false, |
|||
"optimization": false, |
|||
"vendorChunk": true, |
|||
"extractLicenses": false, |
|||
"sourceMap": true, |
|||
"namedChunks": true |
|||
} |
|||
}, |
|||
"defaultConfiguration": "production" |
|||
}, |
|||
"serve": { |
|||
"builder": "@angular-devkit/build-angular:dev-server", |
|||
"configurations": { |
|||
"production": { |
|||
"browserTarget": "Angular-UrbanBazaar:build:production" |
|||
}, |
|||
"development": { |
|||
"browserTarget": "Angular-UrbanBazaar:build:development" |
|||
} |
|||
}, |
|||
"defaultConfiguration": "development" |
|||
}, |
|||
"extract-i18n": { |
|||
"builder": "@angular-devkit/build-angular:extract-i18n", |
|||
"options": { |
|||
"browserTarget": "Angular-UrbanBazaar:build" |
|||
} |
|||
}, |
|||
"test": { |
|||
"builder": "@angular-devkit/build-angular:karma", |
|||
"options": { |
|||
"main": "src/test.ts", |
|||
"polyfills": "src/polyfills.ts", |
|||
"tsConfig": "tsconfig.spec.json", |
|||
"karmaConfig": "karma.conf.js", |
|||
"assets": [ |
|||
"src/favicon.ico", |
|||
"src/assets" |
|||
], |
|||
"styles": [ |
|||
"src/styles.css" |
|||
], |
|||
"scripts": [] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"defaultProject": "Angular-UrbanBazaar" |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
// Karma configuration file, see link for more information
|
|||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|||
|
|||
module.exports = function (config) { |
|||
config.set({ |
|||
basePath: '', |
|||
frameworks: ['jasmine', '@angular-devkit/build-angular'], |
|||
plugins: [ |
|||
require('karma-jasmine'), |
|||
require('karma-chrome-launcher'), |
|||
require('karma-jasmine-html-reporter'), |
|||
require('karma-coverage'), |
|||
require('@angular-devkit/build-angular/plugins/karma') |
|||
], |
|||
client: { |
|||
jasmine: { |
|||
// you can add configuration options for Jasmine here
|
|||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|||
// for example, you can disable the random execution with `random: false`
|
|||
// or set a specific seed with `seed: 4321`
|
|||
}, |
|||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|||
}, |
|||
jasmineHtmlReporter: { |
|||
suppressAll: true // removes the duplicated traces
|
|||
}, |
|||
coverageReporter: { |
|||
dir: require('path').join(__dirname, './coverage/Angular-UrbanBazaar'), |
|||
subdir: '.', |
|||
reporters: [ |
|||
{ type: 'html' }, |
|||
{ type: 'text-summary' } |
|||
] |
|||
}, |
|||
reporters: ['progress', 'kjhtml'], |
|||
port: 9876, |
|||
colors: true, |
|||
logLevel: config.LOG_INFO, |
|||
autoWatch: true, |
|||
browsers: ['Chrome'], |
|||
singleRun: false, |
|||
restartOnFileChange: true |
|||
}); |
|||
}; |
|||
12122
Angular-UrbanBazaar/package-lock.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,39 @@ |
|||
{ |
|||
"name": "angular-urban-bazaar", |
|||
"version": "0.0.0", |
|||
"scripts": { |
|||
"ng": "ng", |
|||
"start": "ng serve", |
|||
"build": "ng build", |
|||
"watch": "ng build --watch --configuration development", |
|||
"test": "ng test" |
|||
}, |
|||
"private": true, |
|||
"dependencies": { |
|||
"@angular/animations": "~12.1.1", |
|||
"@angular/common": "~12.1.1", |
|||
"@angular/compiler": "~12.1.1", |
|||
"@angular/core": "~12.1.1", |
|||
"@angular/forms": "~12.1.1", |
|||
"@angular/platform-browser": "~12.1.1", |
|||
"@angular/platform-browser-dynamic": "~12.1.1", |
|||
"@angular/router": "~12.1.1", |
|||
"rxjs": "~6.6.0", |
|||
"tslib": "^2.2.0", |
|||
"zone.js": "~0.11.4" |
|||
}, |
|||
"devDependencies": { |
|||
"@angular-devkit/build-angular": "~12.1.1", |
|||
"@angular/cli": "~12.1.1", |
|||
"@angular/compiler-cli": "~12.1.1", |
|||
"@types/jasmine": "~3.6.0", |
|||
"@types/node": "^12.11.1", |
|||
"jasmine-core": "~3.7.0", |
|||
"karma": "~6.3.0", |
|||
"karma-chrome-launcher": "~3.1.0", |
|||
"karma-coverage": "~2.0.3", |
|||
"karma-jasmine": "~4.0.0", |
|||
"karma-jasmine-html-reporter": "^1.5.0", |
|||
"typescript": "~4.3.2" |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
import { NgModule } from '@angular/core'; |
|||
import { RouterModule, Routes } from '@angular/router'; |
|||
import { UserProfileDetailsComponent } from './components/user-profile-details/user-profile-details.component'; |
|||
import { UserShowComponent } from './components/user-show/user-show.component'; |
|||
|
|||
const routes: Routes = [ |
|||
{path:'showAllUsers', component: UserShowComponent}, |
|||
{path:'profile', component: UserProfileDetailsComponent}, |
|||
]; |
|||
|
|||
@NgModule({ |
|||
imports: [RouterModule.forRoot(routes)], |
|||
exports: [RouterModule] |
|||
}) |
|||
export class AppRoutingModule { } |
|||
@ -0,0 +1,3 @@ |
|||
<app-page-nav-bar></app-page-nav-bar> |
|||
|
|||
<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 'Angular-UrbanBazaar'`, () => { |
|||
const fixture = TestBed.createComponent(AppComponent); |
|||
const app = fixture.componentInstance; |
|||
expect(app.title).toEqual('Angular-UrbanBazaar'); |
|||
}); |
|||
|
|||
it('should render title', () => { |
|||
const fixture = TestBed.createComponent(AppComponent); |
|||
fixture.detectChanges(); |
|||
const compiled = fixture.nativeElement; |
|||
expect(compiled.querySelector('.content span').textContent).toContain('Angular-UrbanBazaar 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 = 'Angular-UrbanBazaar'; |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
import { NgModule } from '@angular/core'; |
|||
import { FormsModule } from '@angular/forms'; |
|||
import { BrowserModule } from '@angular/platform-browser'; |
|||
|
|||
import { AppRoutingModule } from './app-routing.module'; |
|||
import { AppComponent } from './app.component'; |
|||
import { HttpClientModule } from '@angular/common/http'; |
|||
import { UserShowComponent } from './components/user-show/user-show.component'; |
|||
import { UserAddComponent } from './components/user-add/user-add.component'; |
|||
import { UserProfileDetailsComponent } from './components/user-profile-details/user-profile-details.component'; |
|||
import { PageNavBarComponent } from './components/page-nav-bar/page-nav-bar.component'; |
|||
|
|||
@NgModule({ |
|||
declarations: [ |
|||
AppComponent, |
|||
UserShowComponent, |
|||
UserAddComponent, |
|||
UserProfileDetailsComponent, |
|||
PageNavBarComponent, |
|||
], |
|||
imports: [ |
|||
BrowserModule, |
|||
AppRoutingModule, |
|||
FormsModule, |
|||
HttpClientModule, |
|||
], |
|||
providers: [], |
|||
bootstrap: [AppComponent] |
|||
}) |
|||
export class AppModule { } |
|||
@ -0,0 +1,99 @@ |
|||
@import url("//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"); |
|||
.navbar-icon-top .navbar-nav .nav-link > .fa { |
|||
position: relative; |
|||
width: 36px; |
|||
font-size: 24px; |
|||
} |
|||
.navbar-icon-top .navbar-nav .nav-link > .fa > .badge { |
|||
font-size: 0.75rem; |
|||
position: absolute; |
|||
right: 0; |
|||
font-family: sans-serif; |
|||
} |
|||
.navbar-icon-top .navbar-nav .nav-link > .fa { |
|||
top: 3px; |
|||
line-height: 12px; |
|||
} |
|||
.navbar-icon-top .navbar-nav .nav-link > .fa > .badge { |
|||
top: -10px; |
|||
} |
|||
@media (min-width: 576px) { |
|||
.navbar-icon-top.navbar-expand-sm .navbar-nav .nav-link { |
|||
text-align: center; |
|||
display: table-cell; |
|||
height: 70px; |
|||
vertical-align: middle; |
|||
padding-top: 0; |
|||
padding-bottom: 0; |
|||
} |
|||
.navbar-icon-top.navbar-expand-sm .navbar-nav .nav-link > .fa { |
|||
display: block; |
|||
width: 48px; |
|||
margin: 2px auto 4px auto; |
|||
top: 0; |
|||
line-height: 24px; |
|||
} |
|||
.navbar-icon-top.navbar-expand-sm .navbar-nav .nav-link > .fa > .badge { |
|||
top: -7px; |
|||
} |
|||
} |
|||
@media (min-width: 768px) { |
|||
.navbar-icon-top.navbar-expand-md .navbar-nav .nav-link { |
|||
text-align: center; |
|||
display: table-cell; |
|||
height: 70px; |
|||
vertical-align: middle; |
|||
padding-top: 0; |
|||
padding-bottom: 0; |
|||
} |
|||
.navbar-icon-top.navbar-expand-md .navbar-nav .nav-link > .fa { |
|||
display: block; |
|||
width: 48px; |
|||
margin: 2px auto 4px auto; |
|||
top: 0; |
|||
line-height: 24px; |
|||
} |
|||
.navbar-icon-top.navbar-expand-md .navbar-nav .nav-link > .fa > .badge { |
|||
top: -7px; |
|||
} |
|||
} |
|||
@media (min-width: 992px) { |
|||
.navbar-icon-top.navbar-expand-lg .navbar-nav .nav-link { |
|||
text-align: center; |
|||
display: table-cell; |
|||
height: 70px; |
|||
vertical-align: middle; |
|||
padding-top: 0; |
|||
padding-bottom: 0; |
|||
} |
|||
.navbar-icon-top.navbar-expand-lg .navbar-nav .nav-link > .fa { |
|||
display: block; |
|||
width: 48px; |
|||
margin: 2px auto 4px auto; |
|||
top: 0; |
|||
line-height: 24px; |
|||
} |
|||
.navbar-icon-top.navbar-expand-lg .navbar-nav .nav-link > .fa > .badge { |
|||
top: -7px; |
|||
} |
|||
} |
|||
@media (min-width: 1200px) { |
|||
.navbar-icon-top.navbar-expand-xl .navbar-nav .nav-link { |
|||
text-align: center; |
|||
display: table-cell; |
|||
height: 70px; |
|||
vertical-align: middle; |
|||
padding-top: 0; |
|||
padding-bottom: 0; |
|||
} |
|||
.navbar-icon-top.navbar-expand-xl .navbar-nav .nav-link > .fa { |
|||
display: block; |
|||
width: 48px; |
|||
margin: 2px auto 4px auto; |
|||
top: 0; |
|||
line-height: 24px; |
|||
} |
|||
.navbar-icon-top.navbar-expand-xl .navbar-nav .nav-link > .fa > .badge { |
|||
top: -7px; |
|||
} |
|||
} |
|||
@ -0,0 +1,72 @@ |
|||
<p>page-nav-bar works!</p> |
|||
|
|||
<nav class="navbar navbar-icon-top navbar-expand-lg navbar-dark bg-dark"> |
|||
<a class="navbar-brand" href="#">Navbar</a> |
|||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> |
|||
<span class="navbar-toggler-icon"></span> |
|||
</button> |
|||
|
|||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> |
|||
<ul class="navbar-nav mr-auto"> |
|||
<li class="nav-item active"> |
|||
<a class="nav-link" href="#"> |
|||
<i class="fa fa-home"></i> |
|||
Home |
|||
<span class="sr-only">(current)</span> |
|||
</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a class="nav-link" href="#"> |
|||
<i class="fa fa-envelope-o"> |
|||
<span class="badge badge-danger">11</span> |
|||
</i> |
|||
Link |
|||
</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a class="nav-link disabled" href="#"> |
|||
<i class="fa fa-envelope-o"> |
|||
<span class="badge badge-warning">11</span> |
|||
</i> |
|||
Disabled |
|||
</a> |
|||
</li> |
|||
<li class="nav-item dropdown"> |
|||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|||
<i class="fa fa-envelope-o"> |
|||
<span class="badge badge-primary">11</span> |
|||
</i> |
|||
Dropdown |
|||
</a> |
|||
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> |
|||
<a class="dropdown-item" href="#">Action</a> |
|||
<a class="dropdown-item" href="#">Another action</a> |
|||
<div class="dropdown-divider"></div> |
|||
<a class="dropdown-item" href="#">Something else here</a> |
|||
</div> |
|||
</li> |
|||
</ul> |
|||
<ul class="navbar-nav "> |
|||
<li class="nav-item"> |
|||
<a class="nav-link" href="#"> |
|||
<i class="fa fa-bell"> |
|||
<span class="badge badge-info">11</span> |
|||
</i> |
|||
Test |
|||
</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a class="nav-link" href="#"> |
|||
<i class="fa fa-globe"> |
|||
<span class="badge badge-success">11</span> |
|||
</i> |
|||
Test |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
<form class="form-inline my-2 my-lg-0"> |
|||
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> |
|||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> |
|||
</form> |
|||
</div> |
|||
</nav> |
|||
@ -0,0 +1,25 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { PageNavBarComponent } from './page-nav-bar.component'; |
|||
|
|||
describe('PageNavBarComponent', () => { |
|||
let component: PageNavBarComponent; |
|||
let fixture: ComponentFixture<PageNavBarComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ PageNavBarComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(PageNavBarComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,15 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'app-page-nav-bar', |
|||
templateUrl: './page-nav-bar.component.html', |
|||
styleUrls: ['./page-nav-bar.component.css'] |
|||
}) |
|||
export class PageNavBarComponent implements OnInit { |
|||
|
|||
constructor() { } |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1 @@ |
|||
<p>user-add works!</p> |
|||
@ -0,0 +1,25 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { UserAddComponent } from './user-add.component'; |
|||
|
|||
describe('UserAddComponent', () => { |
|||
let component: UserAddComponent; |
|||
let fixture: ComponentFixture<UserAddComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ UserAddComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(UserAddComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,15 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'app-user-add', |
|||
templateUrl: './user-add.component.html', |
|||
styleUrls: ['./user-add.component.css'] |
|||
}) |
|||
export class UserAddComponent implements OnInit { |
|||
|
|||
constructor() { } |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
body { |
|||
padding-left: 10px; |
|||
color: #212121; |
|||
} |
|||
|
|||
div { |
|||
padding: 24px 32px 0; |
|||
box-sizing: border-box; |
|||
margin: 0; |
|||
} |
|||
|
|||
._3E8aIl { |
|||
background-color: #fff; |
|||
border-radius: 2px; |
|||
box-shadow: 0 2px 4px 0 rgba(0,0,0,.08); |
|||
} |
|||
|
|||
._3X2gOt { |
|||
vertical-align: middle; |
|||
width: 50px; |
|||
height: 50px; |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
<p>user-profile-details works!</p> |
|||
|
|||
<body> |
|||
<div> |
|||
<p> |
|||
Personal Information |
|||
<button class="btn" (click)="editUserName()">Edit</button> <br> |
|||
<input name="firstName" value="{{user.userfirstname}}" disabled=""> |
|||
<input name="lastName" value="{{user.userlastname}}" disabled=""> |
|||
</p> |
|||
<p> |
|||
Email Address |
|||
<button class="btn" (click)="editEmail()">Edit</button> |
|||
<button class="btn" (click)="editPassword()">Change Password</button> <br> |
|||
<input name="firstName" value="{{user.useremail}}" disabled=""> |
|||
</p> |
|||
<p> |
|||
Mobile Number |
|||
<button class="btn" (click)="editPhone()">Edit</button> <br> |
|||
<input type="number" name="firstName" value="{{user.userphone}}" disabled=""> |
|||
</p> |
|||
<br> |
|||
<h4>FAQs</h4> |
|||
<b>What happens when I update my email address (or mobile number)?</b> <br> |
|||
Your login email id (or mobile number) changes, likewise. You'll receive all your account related communication on your updated email address (or mobile number). <br><br> |
|||
<b>When will my UrbanBazaar account be updated with the new email address (or mobile number)?</b> <br> |
|||
It happens as soon as you confirm the verification code sent to your email (or mobile) and save the changes. <br><br> |
|||
<b>What happens to my existing UrbanBazaar account when I update my email address (or mobile number)?</b> <br> |
|||
Updating your email address (or mobile number) doesn't invalidate your account. Your account remains fully functional. |
|||
You'll continue seeing your Order history, saved information and personal details. <br><br> |
|||
<b>Does my Seller account get affected when I update my email address?</b> <br> |
|||
UrbanBazaar has a 'single sign-on' policy. |
|||
Any changes will reflect in your Seller account also. |
|||
</div> |
|||
<br><br><br> |
|||
</body> |
|||
@ -0,0 +1,25 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { UserProfileDetailsComponent } from './user-profile-details.component'; |
|||
|
|||
describe('UserProfileDetailsComponent', () => { |
|||
let component: UserProfileDetailsComponent; |
|||
let fixture: ComponentFixture<UserProfileDetailsComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ UserProfileDetailsComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(UserProfileDetailsComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,39 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { User } from 'src/app/models/user'; |
|||
import { UserService } from 'src/app/services/user.service'; |
|||
|
|||
@Component({ |
|||
selector: 'app-user-profile-details', |
|||
templateUrl: './user-profile-details.component.html', |
|||
styleUrls: ['./user-profile-details.component.css'] |
|||
}) |
|||
export class UserProfileDetailsComponent implements OnInit { |
|||
currentUser : Observable<User>; |
|||
user : User; |
|||
|
|||
constructor(private _userService : UserService) { |
|||
this.currentUser = this._userService.searchUser(100); |
|||
this.currentUser.subscribe((user: User)=> this.user = user); |
|||
} |
|||
|
|||
public editUserName() { |
|||
alert("editUserName pressed !"); |
|||
} |
|||
|
|||
public editEmail() { |
|||
alert("editEmail pressed !"); |
|||
} |
|||
|
|||
public editPassword() { |
|||
alert("editPassword pressed !"); |
|||
} |
|||
|
|||
public editPhone() { |
|||
alert("editPhone pressed !"); |
|||
} |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1 @@ |
|||
<p>user-search works!</p> |
|||
@ -0,0 +1,25 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { UserSearchComponent } from './user-search.component'; |
|||
|
|||
describe('UserSearchComponent', () => { |
|||
let component: UserSearchComponent; |
|||
let fixture: ComponentFixture<UserSearchComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ UserSearchComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(UserSearchComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,15 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'app-user-search', |
|||
templateUrl: './user-search.component.html', |
|||
styleUrls: ['./user-search.component.css'] |
|||
}) |
|||
export class UserSearchComponent implements OnInit { |
|||
|
|||
constructor() { } |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
body { |
|||
padding-left: 10px; |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
<p>user-show works!</p> |
|||
|
|||
<body> |
|||
<h3>All User Details</h3> |
|||
|
|||
<table class="table table-hover"> |
|||
<tr> |
|||
<th>User Id</th> |
|||
<th>User Email</th> |
|||
<th>First Name</th> |
|||
<th>City</th> |
|||
<th>Zipcode</th> |
|||
<th>Phone</th> |
|||
<th>Address Line 1</th> |
|||
<th>Address Line 2</th> |
|||
</tr> |
|||
<tr *ngFor="let user of userList | async"> |
|||
<td>{{user.userid}}</td> |
|||
<td>{{user.useremail}}</td> |
|||
<td>{{user.userfirstname}}</td> |
|||
<td>{{user.usercity}}</td> |
|||
<td>{{user.userzip}}</td> |
|||
<td>{{user.userphone}}</td> |
|||
<td>{{user.useraddress}}</td> |
|||
<td>{{user.useraddress2}}</td> |
|||
</tr> |
|||
</table> |
|||
|
|||
</body> |
|||
@ -0,0 +1,25 @@ |
|||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
|||
|
|||
import { UserShowComponent } from './user-show.component'; |
|||
|
|||
describe('UserShowComponent', () => { |
|||
let component: UserShowComponent; |
|||
let fixture: ComponentFixture<UserShowComponent>; |
|||
|
|||
beforeEach(async () => { |
|||
await TestBed.configureTestingModule({ |
|||
declarations: [ UserShowComponent ] |
|||
}) |
|||
.compileComponents(); |
|||
}); |
|||
|
|||
beforeEach(() => { |
|||
fixture = TestBed.createComponent(UserShowComponent); |
|||
component = fixture.componentInstance; |
|||
fixture.detectChanges(); |
|||
}); |
|||
|
|||
it('should create', () => { |
|||
expect(component).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,22 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { User } from 'src/app/models/user'; |
|||
import { UserService } from 'src/app/services/user.service'; |
|||
|
|||
@Component({ |
|||
selector: 'app-user-show', |
|||
templateUrl: './user-show.component.html', |
|||
styleUrls: ['./user-show.component.css'] |
|||
}) |
|||
export class UserShowComponent implements OnInit { |
|||
|
|||
userList : Observable<User[]>; |
|||
|
|||
constructor(private _userService : UserService) { |
|||
this.userList = this._userService.showAllUsers(); |
|||
} |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
import { MemberUser } from './member-user'; |
|||
|
|||
describe('MemberUser', () => { |
|||
it('should create an instance', () => { |
|||
expect(new MemberUser()).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,10 @@ |
|||
export class MemberUser { |
|||
public userid : number; |
|||
public memberid : number; |
|||
public membername : string; |
|||
public totalitems : number; |
|||
public memberphone : string; |
|||
public membertotalamount : number; |
|||
|
|||
constructor() {} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
import { Orders } from './orders'; |
|||
|
|||
describe('Orders', () => { |
|||
it('should create an instance', () => { |
|||
expect(new Orders()).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,21 @@ |
|||
export class Orders { |
|||
|
|||
public orderid : number; |
|||
public orderuserid : number; |
|||
public orderamount : number; |
|||
public ordershipaddress : string; |
|||
public ordershipaddress2 : string; |
|||
public ordercity : string; |
|||
public orderzip : string; |
|||
public orderstate : string; |
|||
public ordercountry : string; |
|||
public orderphone : string; |
|||
public ordershippingcost : number; |
|||
public ordertax : number; |
|||
public orderemail : string; |
|||
public orderdate : Date; |
|||
public ordershipped : string; |
|||
public ordertrackingnumber : string; |
|||
|
|||
constructor() {} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
import { ProductCategory } from './product-category'; |
|||
|
|||
describe('ProductCategory', () => { |
|||
it('should create an instance', () => { |
|||
expect(new ProductCategory()).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,7 @@ |
|||
export class ProductCategory { |
|||
|
|||
public categoryid : number; |
|||
public categoryname : string; |
|||
|
|||
constructor() {} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
import { Product } from './product'; |
|||
|
|||
describe('Product', () => { |
|||
it('should create an instance', () => { |
|||
expect(new Product()).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,13 @@ |
|||
export class Product { |
|||
|
|||
public productid : number; |
|||
public productname : string; |
|||
public productprice : number; |
|||
public productweight : number; |
|||
public productshortdesc : string; |
|||
public productlongdesc : string; |
|||
public productimage : string; |
|||
public productcategoryid : number; |
|||
|
|||
constructor() {} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
import { User } from './user'; |
|||
|
|||
describe('User', () => { |
|||
it('should create an instance', () => { |
|||
expect(new User()).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,15 @@ |
|||
export class User { |
|||
public userid : number; |
|||
public useremail : string; |
|||
public userpassword : string; |
|||
public userfirstname : string; |
|||
public userlastname : string; |
|||
public usercity: string; |
|||
public userstate : string; |
|||
public userzip : string; |
|||
public userphone : string; |
|||
public useraddress : string; |
|||
public useraddress2 : string; |
|||
|
|||
constructor() {} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
import { TestBed } from '@angular/core/testing'; |
|||
|
|||
import { MemberUserService } from './member-user.service'; |
|||
|
|||
describe('MemberUserService', () => { |
|||
let service: MemberUserService; |
|||
|
|||
beforeEach(() => { |
|||
TestBed.configureTestingModule({}); |
|||
service = TestBed.inject(MemberUserService); |
|||
}); |
|||
|
|||
it('should be created', () => { |
|||
expect(service).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,23 @@ |
|||
import { HttpClient } from '@angular/common/http'; |
|||
import { Injectable } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { MemberUser } from '../models/member-user'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class MemberUserService { |
|||
|
|||
private _url : String = "http://localhost:9000"; |
|||
|
|||
constructor(private _http : HttpClient) { } |
|||
|
|||
public showMembersByUser(id : number) : Observable<MemberUser[]> { |
|||
return this._http.get<MemberUser[]>(this._url+"/showUserMembers/"+id); |
|||
} |
|||
|
|||
public addMemberToUser(member : MemberUser) { |
|||
this._http.post(this._url+"/addMember", member); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
import { TestBed } from '@angular/core/testing'; |
|||
|
|||
import { OrdersService } from './orders.service'; |
|||
|
|||
describe('OrdersService', () => { |
|||
let service: OrdersService; |
|||
|
|||
beforeEach(() => { |
|||
TestBed.configureTestingModule({}); |
|||
service = TestBed.inject(OrdersService); |
|||
}); |
|||
|
|||
it('should be created', () => { |
|||
expect(service).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,27 @@ |
|||
import { HttpClient } from '@angular/common/http'; |
|||
import { Injectable } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { Orders } from '../models/orders'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class OrdersService { |
|||
|
|||
private _url : String = "http://localhost:9000"; |
|||
|
|||
constructor(private _http : HttpClient) { } |
|||
|
|||
public addOrder(order : Orders) { |
|||
this._http.post(this._url+"/addOrder", order); |
|||
} |
|||
|
|||
public findOrder(id : number) : Observable<Orders> { |
|||
return this._http.get<Orders>(this._url+"/findOrder"+id); |
|||
} |
|||
|
|||
public findOrdersByUser(id : number) : Observable<Orders[]> { |
|||
return this._http.get<Orders[]>(this._url+"/findOrdersByUser"+id); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
import { TestBed } from '@angular/core/testing'; |
|||
|
|||
import { ProductCategoryService } from './product-category.service'; |
|||
|
|||
describe('ProductCategoryService', () => { |
|||
let service: ProductCategoryService; |
|||
|
|||
beforeEach(() => { |
|||
TestBed.configureTestingModule({}); |
|||
service = TestBed.inject(ProductCategoryService); |
|||
}); |
|||
|
|||
it('should be created', () => { |
|||
expect(service).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,18 @@ |
|||
import { HttpClient } from '@angular/common/http'; |
|||
import { Injectable } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { ProductCategory } from '../models/product-category'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class ProductCategoryService { |
|||
|
|||
private _url : String = "http://localhost:9000"; |
|||
|
|||
constructor(private _http : HttpClient) { } |
|||
|
|||
public showAllCategory() : Observable<ProductCategory[]> { |
|||
return this._http.get<ProductCategory[]>(this._url+"/showProductCategory"); |
|||
} |
|||
} |
|||
@ -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,22 @@ |
|||
import { HttpClient } from '@angular/common/http'; |
|||
import { Injectable } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { Product } from '../models/product'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class ProductService { |
|||
private _url : String = "http://localhost:9000"; |
|||
|
|||
constructor(private _http : HttpClient) { } |
|||
|
|||
public showAllProduct() : Observable<Product[]> { |
|||
return this._http.get<Product[]>(this._url+"/showAllProducts"); |
|||
} |
|||
|
|||
public searchProduct(name : string) : Observable<Product[]> { |
|||
return this._http.get<Product[]>(this._url+"/searchProduct/"+name); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
import { TestBed } from '@angular/core/testing'; |
|||
|
|||
import { UserService } from './user.service'; |
|||
|
|||
describe('UserService', () => { |
|||
let service: UserService; |
|||
|
|||
beforeEach(() => { |
|||
TestBed.configureTestingModule({}); |
|||
service = TestBed.inject(UserService); |
|||
}); |
|||
|
|||
it('should be created', () => { |
|||
expect(service).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,27 @@ |
|||
import { HttpClient } from '@angular/common/http'; |
|||
import { Injectable } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
import { User } from '../models/user'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class UserService { |
|||
|
|||
private _url : String = "http://localhost:9000"; |
|||
|
|||
constructor(private _http : HttpClient) { } |
|||
|
|||
public showAllUsers() : Observable<User[]> { |
|||
return this._http.get<User[]>(this._url + "/showAllUsers"); |
|||
} |
|||
|
|||
public searchUser(id : number) : Observable<User> { |
|||
return this._http.get<User>(this._url+"/findUserById/"+id); |
|||
} |
|||
|
|||
public addUser(user : User) { |
|||
this._http.post(this._url+"/addUser", user); |
|||
} |
|||
|
|||
} |
|||
@ -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,14 @@ |
|||
<!doctype html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>AngularUrbanBazaar</title> |
|||
<base href="/"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
<link rel="icon" type="image/x-icon" href="favicon.ico"> |
|||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> |
|||
</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,15 @@ |
|||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ |
|||
{ |
|||
"extends": "./tsconfig.json", |
|||
"compilerOptions": { |
|||
"outDir": "./out-tsc/app", |
|||
"types": [] |
|||
}, |
|||
"files": [ |
|||
"src/main.ts", |
|||
"src/polyfills.ts" |
|||
], |
|||
"include": [ |
|||
"src/**/*.d.ts" |
|||
] |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ |
|||
{ |
|||
"compileOnSave": false, |
|||
"compilerOptions": { |
|||
"baseUrl": "./", |
|||
"outDir": "./dist/out-tsc", |
|||
"forceConsistentCasingInFileNames": true, |
|||
"strict": true, |
|||
"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 |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ |
|||
{ |
|||
"extends": "./tsconfig.json", |
|||
"compilerOptions": { |
|||
"outDir": "./out-tsc/spec", |
|||
"types": [ |
|||
"jasmine" |
|||
] |
|||
}, |
|||
"files": [ |
|||
"src/test.ts", |
|||
"src/polyfills.ts" |
|||
], |
|||
"include": [ |
|||
"src/**/*.spec.ts", |
|||
"src/**/*.d.ts" |
|||
] |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue