<cite>aaron: </cite> How about home-routing.module.ts?
here it is
const routes: Routes = [{ path: '', children: [ { path: 'aboutus', component: ---------------------------------}, { path: 'termsandconditions', component: ----------------------------------}, { path: 'privacypolicy', component: -------------------------------------}, { path: 'pickuplocation', component: ----------------------------------------}, { path: 'faq', component: -------------------------------}, { path: 'cookypolicies', component: -----------------------------}, { path: 'contact', component: -----------------------------------} ] }];
dots are replacing the names of the components
is it because on those pages I am displaying the menu and other default control like user settings dropdown button or something?
<cite>aaron: </cite>
If I change the default route to one of my page the app is just looping infinitely.
Did you register the route to your page in main-routing.module.ts?
children: [ { path: 'dashboard', component: DashboardComponent, data: { permission: 'Pages.Tenant.Dashboard' } } ]
yes here is my module
{ path: 'home', loadChildren: 'app/home/home.module#HomeModule', //Lazy load Home module data: { preload: true } },
I still don't see what makes it anonymous.
In the above, you can see that 'dashboard' has permission. Compare this to account-routing.module.ts:
children: [ { path: 'login', component: LoginComponent }, { path: 'register', component: RegisterComponent }, // ... ]
More examples in admin-routing.module.ts.
<cite>aaron: </cite> Did you register the routes for your module in app-routing.module.ts?
so in the app routing module I have this }, { path: 'main', loadChildren: 'app/main/main.module#MainModule', //Lazy load main module data: { preload: true } }, and in my main module I have this { path: 'home', loadChildren: 'app/home/home.module#HomeModule', //Lazy load Home module data: { preload: true } }, there is no permission on it as you can see
<cite>aaron: </cite> Did you register the routes for your module in app-routing.module.ts?
no I did not. Everything is created in the main module therefore routes are created in the main-routing.module.ts Is it possible to have anything anonymous in it? If yes how to proceed?
and in my home module I have this
const routes: Routes = [{ path: '', children: [ { path: 'aboutus', component: AboutUsComponent }, etc...
so accessing aboutus should be free but still requires login. I dont understand
<cite>aaron: </cite>
If I change the default route to one of my page the app is just looping infinitely.
Did you register the route to your page in main-routing.module.ts?
children: [ { path: 'dashboard', component: DashboardComponent, data: { permission: 'Pages.Tenant.Dashboard' } } ]
yes here is my module
{ path: 'home', loadChildren: 'app/home/home.module#HomeModule', //Lazy load Home module data: { preload: true } },
I still don't see what makes it anonymous.
In the above, you can see that 'dashboard' has permission. Compare this to account-routing.module.ts:
children: [ { path: 'login', component: LoginComponent }, { path: 'register', component: RegisterComponent }, // ... ]
More examples in admin-routing.module.ts.
so modifying file auth-route-guard.ts is not enough. I redirected to a page insinde app main module but I have an error saying user was not logged in and the app is redirecting the route to login page automatically.
Can we have direction how to create an anonymous page in main module please?
Hello I have the same problem making page anonymous. Honestly I've looking at the account module for 3 hours now I still dont see what makes it anounymous. I create a module inside the app folder without any restriction it looks like no matter what you create in that folder can not be access to anonymous users. If I change the default route to one of my page the app is just looping infinitly. So can anybody really provide help on this? Please ?
here is the full stack exception
Test Name: **************Tests.Should_Get_Full Test FullName: **************Tests.Should_Get_Full Test Source: *****************************AppService_Tests.cs : line 24 Test Outcome: Failed Test Duration: 0:00:00.001
Result StackTrace:
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary
2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable
1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.CreateTables()
at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureCreated()
at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreated()
at *******************.Tests.DependencyInjection.ServiceCollectionRegistrar.Register(IIocManager iocManager) in ***************************\DependencyInjection\ServiceCollectionRegistrar.cs:line 31
at **********************TestModule.Initialize() in ********************************************************.Tests*****************TestModule.cs:line 63
at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_1(AbpModuleInfo module)
at System.Collections.Generic.List1.ForEach(Action
1 action)
at Abp.Modules.AbpModuleManager.StartModules()
at Abp.AbpBootstrapper.Initialize()
at Abp.TestBase.AbpIntegratedTestBase1.InitializeAbp() at Abp.TestBase.AbpIntegratedTestBase
1..ctor(Boolean initializeAbp)
at *******************************.Tests.AppTestBase..ctor() in ********************************************************************\AppTestBase.cs:line 27
at **********************_Tests..ctor() in ****************************************************************_Tests.cs:line 17
Result Message: Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'near "max": syntax error'.