Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
PSManagementUI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hasan.bahjat
PSManagementUI
Commits
ea758d92
Commit
ea758d92
authored
Sep 01, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add constant app name from enivoment
parent
059369e5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
31 deletions
+36
-31
app.component.css
src/app/app.component.css
+0
-0
app.component.ts
src/app/app.component.ts
+8
-6
app.config.ts
src/app/app.config.ts
+0
-8
configuration.service.spec.ts
...core/services/configuration/configuration.service.spec.ts
+0
-16
configuration.service.ts
src/app/core/services/configuration/configuration.service.ts
+26
-1
environment.ts
src/environments/environment.ts
+2
-0
No files found.
src/app/app.component.css
deleted
100644 → 0
View file @
059369e5
src/app/app.component.ts
View file @
ea758d92
import
{
AfterViewInit
,
Component
}
from
'@angular/core'
;
import
{
AfterViewInit
,
Component
}
from
'@angular/core'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
import
{
ConfigurationService
}
from
'./core/services/configuration/configuration.service'
;
@
Component
({
@
Component
({
selector
:
'app-root'
,
selector
:
'app-root'
,
templateUrl
:
'./app.component.html'
,
templateUrl
:
'./app.component.html'
styleUrls
:
[
'./app.component.css'
]
})
})
export
class
AppComponent
{
export
class
AppComponent
{
title
=
"PSManagement"
;
title
=
ConfigurationService
.
AppName
;
constructor
()
{
}
//#region Application Costrucotr
constructor
(
private
config
:
ConfigurationService
)
{
}
//#endregion Application Costrucotr
}
}
src/app/app.config.ts
deleted
100644 → 0
View file @
059369e5
import
{
ApplicationConfig
,
provideZoneChangeDetection
}
from
'@angular/core'
;
import
{
provideRouter
}
from
'@angular/router'
;
import
{
routes
}
from
'./app-routing.module'
;
// export const appConfig: ApplicationConfig = {
// providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)]
// };
src/app/core/services/configuration/configuration.service.spec.ts
deleted
100644 → 0
View file @
059369e5
import
{
TestBed
}
from
'@angular/core/testing'
;
import
{
ConfigurationService
}
from
'./configuration.service'
;
describe
(
'ConfigurationService'
,
()
=>
{
let
service
:
ConfigurationService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
ConfigurationService
);
});
it
(
'should be created'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/core/services/configuration/configuration.service.ts
View file @
ea758d92
...
@@ -6,11 +6,36 @@ import { environment } from '../../../../environments/environment';
...
@@ -6,11 +6,36 @@ import { environment } from '../../../../environments/environment';
providedIn
:
'root'
providedIn
:
'root'
})
})
export
class
ConfigurationService
{
export
class
ConfigurationService
{
private
baseUrl
=
environment
.
serverUrl
;
//#region Constants
// application name
public
static
AppName
=
environment
.
applicationName
;
//#endregion Constatns
//#region Dependencies
private
baseUrl
=
environment
.
serverUrl
;
//#endregion Dependencies
//#region Constructors
constructor
()
{
}
constructor
()
{
}
//#endregion Constructors
//#region App name Accessor
public
getAppName
(){
return
ConfigurationService
.
AppName
;
}
//#endregion App name Accessor
//#region Server URL Accessor
public
getServerUrl
(){
public
getServerUrl
(){
return
this
.
baseUrl
;
return
this
.
baseUrl
;
}
}
//#endregion Server URL Accessor
}
}
src/environments/environment.ts
View file @
ea758d92
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
export
const
environment
=
{
export
const
environment
=
{
production
:
false
,
production
:
false
,
serverUrl
:
'https://localhost:5001/api'
,
serverUrl
:
'https://localhost:5001/api'
,
applicationName
:
'نظام إدارة حالة المشاريع'
};
};
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment