├── Angular 7 ├── src │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ ├── 403.png │ │ │ ├── add_user.png │ │ │ └── single_user.png │ ├── app │ │ ├── app.component.css │ │ ├── admin-panel │ │ │ ├── admin-panel.component.html │ │ │ └── admin-panel.component.ts │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── user │ │ │ ├── user.component.ts │ │ │ ├── user.component.html │ │ │ ├── login │ │ │ │ ├── login.component.html │ │ │ │ └── login.component.ts │ │ │ └── registration │ │ │ │ ├── registration.component.ts │ │ │ │ └── registration.component.html │ │ ├── forbidden │ │ │ ├── forbidden.component.ts │ │ │ └── forbidden.component.html │ │ ├── home │ │ │ ├── home.component.html │ │ │ └── home.component.ts │ │ ├── auth │ │ │ ├── auth.guard.ts │ │ │ └── auth.interceptor.ts │ │ ├── app.component.spec.ts │ │ ├── app-routing.module.ts │ │ ├── app.module.ts │ │ └── shared │ │ │ └── user.service.ts │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── tslint.json │ ├── main.ts │ ├── browserslist │ ├── test.ts │ ├── karma.conf.js │ ├── index.html │ ├── styles.css │ └── polyfills.ts ├── e2e │ ├── src │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── tsconfig.e2e.json │ └── protractor.conf.js ├── .editorconfig ├── tsconfig.json ├── .gitignore ├── appStructure.txt ├── README.md ├── package.json ├── tslint.json └── angular.json ├── WebAPI ├── .vs │ ├── WebAPI │ │ └── v15 │ │ │ ├── Server │ │ │ └── sqlite3 │ │ │ │ ├── db.lock │ │ │ │ ├── storage.ide │ │ │ │ ├── storage.ide-shm │ │ │ │ └── storage.ide-wal │ │ │ └── .suo │ └── config │ │ └── applicationhost.config ├── WebAPI │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.2 │ │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ │ ├── WebAPI.RazorAssemblyInfo.cache │ │ │ │ ├── WebAPI.AssemblyInfoInputs.cache │ │ │ │ ├── WebAPI.RazorTargetAssemblyInfo.cache │ │ │ │ ├── WebAPI.csproj.CoreCompileInputs.cache │ │ │ │ ├── WebAPI.dll │ │ │ │ ├── WebAPI.pdb │ │ │ │ ├── WebAPI.assets.cache │ │ │ │ ├── WebAPI.csprojAssemblyReference.cache │ │ │ │ ├── WebAPI.RazorAssemblyInfo.cs │ │ │ │ ├── WebAPI.AssemblyInfo.cs │ │ │ │ └── WebAPI.csproj.FileListAbsolute.txt │ │ ├── WebAPI.csproj.nuget.cache │ │ ├── WebAPI.csproj.nuget.g.targets │ │ └── WebAPI.csproj.nuget.g.props │ ├── appsettings.Development.json │ ├── bin │ │ └── Debug │ │ │ └── netcoreapp2.2 │ │ │ ├── WebAPI.dll │ │ │ ├── WebAPI.pdb │ │ │ ├── WebAPI.runtimeconfig.dev.json │ │ │ └── WebAPI.runtimeconfig.json │ ├── Models │ │ ├── LoginModel.cs │ │ ├── ApplicationSettings.cs │ │ ├── ApplicationUser.cs │ │ ├── ApplicationUserModel.cs │ │ └── AuthenticationContext.cs │ ├── appsettings.json │ ├── WebAPI.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPI.csproj.user │ ├── Controllers │ │ ├── ValuesController.cs │ │ ├── UserProfileController.cs │ │ └── ApplicationUserController.cs │ ├── Startup.cs │ └── Migrations │ │ ├── AuthenticationContextModelSnapshot.cs │ │ ├── 20190124045416_InitialCreate.Designer.cs │ │ └── 20190124045416_InitialCreate.cs └── WebAPI.sln └── README.md /Angular 7/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular 7/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular 7/src/app/admin-panel/admin-panel.component.html: -------------------------------------------------------------------------------- 1 |
2 | admin-panel works! 3 |
4 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular 7/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.RazorAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | 956d135b4025f3ddc3d3abd4139e3f09fdc815fb 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 8071d147e32d0630849d28d7010f1c7d9f5cfc82 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.RazorTargetAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | 425a257f2524fe85d4c5b963eb1a394a4032abc4 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 001a6e34bdf223b96578f3873774e0dc2f7bf45a 2 | -------------------------------------------------------------------------------- /Angular 7/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
6 |
7 | You don't have the permission to access this resource.
11 |
2 |
--------------------------------------------------------------------------------
/Angular 7/src/app/home/home.component.ts:
--------------------------------------------------------------------------------
1 | import { UserService } from './../shared/user.service';
2 | import { Component, OnInit } from '@angular/core';
3 | import { Router } from '@angular/router';
4 |
5 | @Component({
6 | selector: 'app-home',
7 | templateUrl: './home.component.html',
8 | styles: []
9 | })
10 | export class HomeComponent implements OnInit {
11 | userDetails;
12 |
13 | constructor(private router: Router, private service: UserService) { }
14 |
15 | ngOnInit() {
16 | this.service.getUserProfile().subscribe(
17 | res => {
18 | this.userDetails = res;
19 | },
20 | err => {
21 | console.log(err);
22 | },
23 | );
24 | }
25 |
26 |
27 | onLogout() {
28 | localStorage.removeItem('token');
29 | this.router.navigate(['/user/login']);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Angular 7/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/WebAPI/WebAPI/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:54277",
8 | "sslPort": 0
9 | }
10 | },
11 | "profiles": {
12 | "IIS Express": {
13 | "commandName": "IISExpress",
14 | "launchBrowser": true,
15 | "launchUrl": "api/values",
16 | "environmentVariables": {
17 | "ASPNETCORE_ENVIRONMENT": "Development"
18 | }
19 | },
20 | "WebAPI": {
21 | "commandName": "Project",
22 | "launchBrowser": true,
23 | "launchUrl": "api/values",
24 | "applicationUrl": "http://localhost:5000",
25 | "environmentVariables": {
26 | "ASPNETCORE_ENVIRONMENT": "Development"
27 | }
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/WebAPI/WebAPI/WebAPI.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |