Commit a72a7c1b authored by hasan khaddour's avatar hasan khaddour

fix s

parent 295962a5
This diff is collapsed.
......@@ -6,7 +6,8 @@
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"test": "ng test",
"extract-i18n": "ng extract-i18n && xliffmerge --profile xliffmerge.json"
},
"private": true,
"dependencies": {
......@@ -45,6 +46,8 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.4.2"
"ngx-i18nsupport": "^0.17.1",
"typescript": "~5.4.2",
"xliffmerge": "^1.0.0"
}
}
......@@ -5,7 +5,7 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { LoginComponent } from './pages/login/login.component';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { ConfigurationService } from './core/services/configuration/configuration.service';
import { CoreModule } from './core/core.module';
import { HomeComponent } from './pages/home/home.component';
......@@ -17,7 +17,7 @@ import { HeaderComponent } from './shared/sharedLayout/header/header.component';
import { CustomersModule } from './customers/customers.module';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { PageNotfoundComponent } from './pages/page-notfound/page-notfound.component';
import { LOCALE_ID } from '@angular/core';
@NgModule({
declarations: [
AppComponent,
......@@ -37,8 +37,12 @@ import { PageNotfoundComponent } from './pages/page-notfound/page-notfound.compo
],
providers: [
provideAnimationsAsync()
provideAnimationsAsync(),
{ provide: LOCALE_ID, useValue: 'en' }
],
bootstrap: [AppComponent]
})
export class AppModule { }
// export function HttpLoaderFactory(http: HttpClient) {
// return new TranslateHttpLoader(http);
// }
import { TestBed } from '@angular/core/testing';
import { CanActivateFn } from '@angular/router';
import { authGuard } from './auth.guard';
describe('authGuard', () => {
const executeGuard: CanActivateFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => authGuard(...guardParameters));
beforeEach(() => {
TestBed.configureTestingModule({});
});
it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});
......@@ -14,7 +14,7 @@ export class AuthGuard implements CanActivate {
//this.router.navigate(["/login"])
return true;
// if (this.auth.IsAuthenticated()) {
// if (this.auth.isAuthenticated()) {
// return true ;
// } else {
// this.router.navigate(["/login"])
......
......@@ -31,7 +31,7 @@ export class AuthenticationService {
this.config.getServerUrl()+ "/Authentication/register",registerRequest)
}
IsAuthenticated():Boolean{
isAuthenticated():Boolean{
if(this.dataStorage.getItem("token")){
return true ;
}else{
......
......@@ -9,4 +9,5 @@
</div>
<section class="section dashboard">
workkkk
<h1 i18n="@@appTitle">My Awesome App</h1>
</section>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment