Base solution for your next web application

Activities of "squaresunion"

Hello, I create a project .NetCore Angular2 project. Was working good. I started following the step by step development guide. I added a new component. No compiling error in the project server side or client side. But I am facing the below error. I removed the component. Still that error. I cant figure out why just adding a component makes thing go that bad.

Uncaught SyntaxError: Unexpected token < at p (eval at webpackJsonp.14.module.exports (scripts.bundle.js:266), <anonymous>:2:523) at Function.globalEval (eval at webpackJsonp.14.module.exports (scripts.bundle.js:266), <anonymous>:2:2595) at text script (eval at webpackJsonp.14.module.exports (scripts.bundle.js:266), <anonymous>:4:17204) at Nb (eval at webpackJsonp.14.module.exports (scripts.bundle.js:266), <anonymous>:4:10360) at A (eval at webpackJsonp.14.module.exports (scripts.bundle.js:266), <anonymous>:4:13887) at XMLHttpRequest.eval (eval at webpackJsonp.14.module.exports (scripts.bundle.js:266), <anonymous>:4:16491) at XMLHttpRequest.wrapFn (polyfills.bundle.js:6489) at ZoneDelegate.webpackJsonp.543.ZoneDelegate.invokeTask (polyfills.bundle.js:5614) at Object.onInvokeTask (vendor.bundle.js:39489) at ZoneDelegate.webpackJsonp.543.ZoneDelegate.invokeTask (polyfills.bundle.js:5613) at Zone.webpackJsonp.543.Zone.runTask (polyfills.bundle.js:5413) at XMLHttpRequest.ZoneTask.invoke (polyfills.bundle.js:5667)

Hello, I am trying to use a primeng dropdownlist in a modal. Seriously I dont know whats going wrong there. Driving me nuts. Here is the dropdown in the component UI:

<p-dropdown [options]="squGenderList" [styleClass]="'squ-primeng-dropdowlist'" name="selectedGenderName" placeholder="Select gender" [(ngModel)]="selectedGender" optionLabel="name"></p-dropdown>

In the component .ts I am doing this

[code]squGenderList: GenderItem[] = [{ label: this.l('Male'), value: SquGenderEnum.Male }, { label: this.l('Female'), value: SquGenderEnum.Female }];
    selectedGender: GenderItem;

[/code:2g5vpp62]

But during saving if I want to retrieve the selected object doing this.selectedGender it doenst return the selected object. It only returns the selected value. what is wrong with that thing?

Got it working! I had to intialized this that way:

[code] squGenderList: SelectItem[] = [{ label: 'select Gender', value: { label: this.l('None'), value: SquGenderEnum.None } },
        { label: 'Male', value: { label: this.l('Male'), value: SquGenderEnum.Male } },
        { label: 'Female', value: { label: this.l('Female'), value: SquGenderEnum.Female } }];
    selectedGender: GenderItem = { label: this.l('None'), value: SquGenderEnum.None };

[/code:eh3us77j]

No matter which test project I try to run I have an exception Message: Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'near "max": syntax error'. Can you guys help me with that? This is very annoying.

Regards

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, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable1 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(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() at Abp.TestBase.AbpIntegratedTestBase1.InitializeAbp() at Abp.TestBase.AbpIntegratedTestBase1..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'.

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 ?

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?

<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.

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> 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?

Showing 1 to 10 of 45 entries