Init sakai-v19
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NotfoundComponent } from './demo/components/notfound/notfound.component';
|
||||
import { AppLayoutComponent } from "./layout/app.layout.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot([
|
||||
{
|
||||
path: '', component: AppLayoutComponent,
|
||||
children: [
|
||||
{ path: '', loadChildren: () => import('./demo/components/dashboard/dashboard.module').then(m => m.DashboardModule) },
|
||||
{ path: 'uikit', loadChildren: () => import('./demo/components/uikit/uikit.module').then(m => m.UIkitModule) },
|
||||
{ path: 'utilities', loadChildren: () => import('./demo/components/utilities/utilities.module').then(m => m.UtilitiesModule) },
|
||||
{ path: 'documentation', loadChildren: () => import('./demo/components/documentation/documentation.module').then(m => m.DocumentationModule) },
|
||||
{ path: 'blocks', loadChildren: () => import('./demo/components/primeblocks/primeblocks.module').then(m => m.PrimeBlocksModule) },
|
||||
{ path: 'pages', loadChildren: () => import('./demo/components/pages/pages.module').then(m => m.PagesModule) }
|
||||
]
|
||||
},
|
||||
{ path: 'auth', loadChildren: () => import('./demo/components/auth/auth.module').then(m => m.AuthModule) },
|
||||
{ path: 'landing', loadChildren: () => import('./demo/components/landing/landing.module').then(m => m.LandingModule) },
|
||||
{ path: 'notfound', component: NotfoundComponent },
|
||||
{ path: '**', redirectTo: '/notfound' },
|
||||
], { scrollPositionRestoration: 'enabled', anchorScrolling: 'enabled', onSameUrlNavigation: 'reload' })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {
|
||||
}
|
||||
0
src/app/app.component.scss
Normal file
0
src/app/app.component.scss
Normal file
29
src/app/app.component.spec.ts
Normal file
29
src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [AppComponent],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have the 'sakai-19' title`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('sakai-19');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, sakai-19');
|
||||
});
|
||||
});
|
||||
@@ -1,15 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PrimeNGConfig } from 'primeng/api';
|
||||
import { Component } from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html'
|
||||
selector: 'app-root',
|
||||
imports: [RouterModule],
|
||||
templateUrl: './app.component.html'
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
constructor(private primengConfig: PrimeNGConfig) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.primengConfig.ripple = true;
|
||||
}
|
||||
}
|
||||
export class AppComponent {}
|
||||
|
||||
15
src/app/app.config.ts
Normal file
15
src/app/app.config.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { routes } from './app.routes';
|
||||
import { provideHttpClient, withFetch } from '@angular/common/http';
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||
import { provideRouter, withEnabledBlockingInitialNavigation, withInMemoryScrolling } from '@angular/router';
|
||||
import { providePrimeNG } from 'primeng/config';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideRouter(routes, withInMemoryScrolling({ anchorScrolling: 'enabled', scrollPositionRestoration: 'enabled' }), withEnabledBlockingInitialNavigation()),
|
||||
provideHttpClient(withFetch()),
|
||||
provideAnimationsAsync(),
|
||||
providePrimeNG({ ripple: false, inputStyle: 'outlined' })
|
||||
]
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HashLocationStrategy, LocationStrategy, PathLocationStrategy } from '@angular/common';
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppLayoutModule } from './layout/app.layout.module';
|
||||
import { NotfoundComponent } from './demo/components/notfound/notfound.component';
|
||||
import { ProductService } from './demo/service/product.service';
|
||||
import { CountryService } from './demo/service/country.service';
|
||||
import { CustomerService } from './demo/service/customer.service';
|
||||
import { EventService } from './demo/service/event.service';
|
||||
import { IconService } from './demo/service/icon.service';
|
||||
import { NodeService } from './demo/service/node.service';
|
||||
import { PhotoService } from './demo/service/photo.service';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent, NotfoundComponent],
|
||||
imports: [AppRoutingModule, AppLayoutModule],
|
||||
providers: [
|
||||
{ provide: LocationStrategy, useClass: PathLocationStrategy },
|
||||
CountryService, CustomerService, EventService, IconService, NodeService,
|
||||
PhotoService, ProductService
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
21
src/app/app.routes.ts
Normal file
21
src/app/app.routes.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import {AppLayoutComponent} from './layout/app.layout.component';
|
||||
import {NotfoundComponent} from './demo/components/notfound/notfound.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '', component: AppLayoutComponent,
|
||||
children: [
|
||||
{ path: '', loadChildren: () => import('./demo/components/dashboard/dashboard.module').then(m => m.DashboardModule) },
|
||||
{ path: 'uikit', loadChildren: () => import('./demo/components/uikit/uikit.module').then(m => m.UIkitModule) },
|
||||
{ path: 'utilities', loadChildren: () => import('./demo/components/utilities/utilities.module').then(m => m.UtilitiesModule) },
|
||||
{ path: 'documentation', loadChildren: () => import('./demo/components/documentation/documentation.module').then(m => m.DocumentationModule) },
|
||||
{ path: 'blocks', loadChildren: () => import('./demo/components/primeblocks/primeblocks.module').then(m => m.PrimeBlocksModule) },
|
||||
{ path: 'pages', loadChildren: () => import('./demo/components/pages/pages.module').then(m => m.PagesModule) }
|
||||
]
|
||||
},
|
||||
{ path: 'auth', loadChildren: () => import('./demo/components/auth/auth.module').then(m => m.AuthModule) },
|
||||
{ path: 'landing', loadChildren: () => import('./demo/components/landing/landing.module').then(m => m.LandingModule) },
|
||||
{ path: 'notfound', component: NotfoundComponent },
|
||||
{ path: '**', redirectTo: '/notfound' },
|
||||
];
|
||||
Reference in New Issue
Block a user