Base solution for your next web application

Activities of "system15"

Hi all,

I have recently set up a new combined test project using ASP.NET Zero (ASP.NET Core with Angular ) v 5.5.2 within Visual Studio 2017, however, when run I consistently come into this error:

"Castle.Windsor Warning: 0 : Exception when resolving optional dependency Dependency 'Engine' type 'Microsoft.AspNetCore.Razor.Language.RazorEngine' on component Microsoft.AspNetCore.Mvc.Razor.Internal.LazyMetadataReferenceFeature_62e3f504-f32b-472f-bd5c-7908770e5b05., Castle.MicroKernel.CircularDependencyException: Dependency cycle has been detected when trying to resolve component 'Microsoft.AspNetCore.Razor.Language.RazorProjectEngine_bed00051-a7bf-41bb-aca7-2c0191778dff'.
The resolution tree that resulted in the cycle is the following:
Component 'Microsoft.AspNetCore.Razor.Language.RazorProjectEngine_bed00051-a7bf-41bb-aca7-2c0191778dff' resolved as dependency of
	component 'Microsoft.AspNetCore.Razor.Language.RazorEngine_a69b1c79-2cd4-4b6a-900c-d4c4aec62117' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Razor.Internal.LazyMetadataReferenceFeature_62e3f504-f32b-472f-bd5c-7908770e5b05' resolved as dependency of
	component 'Microsoft.AspNetCore.Razor.Language.RazorProjectEngine_bed00051-a7bf-41bb-aca7-2c0191778dff' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilerProvider_d0d641b7-9563-4de8-9186-b92ee116363d' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider_68b648e1-710c-4517-9b24-be0b42e8b92c' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine_72347752-2ad5-45e7-b19e-fe6d80e7c760' resolved as dependency of
	component 'Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcViewOptions, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]_303311ad-f02e-4c2c-b8fa-b03338b02340' resolved as dependency of
	component 'Microsoft.Extensions.Options.IOptionsFactory`1_002af772-e976-4309-a559-11976fea15d5' resolved as dependency of
	component 'Microsoft.Extensions.Options.IOptionsFactory`1_002af772-e976-4309-a559-11976fea15d5' resolved as dependency of
	component 'Microsoft.Extensions.Options.IOptions`1_08388d6e-8a26-4a1c-88eb-d2b3ade02e08' resolved as dependency of
	component 'Microsoft.Extensions.Options.IOptions`1_08388d6e-8a26-4a1c-88eb-d2b3ade02e08' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider_1b1bee81-054a-48a0-9269-ee042607c168' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageLoader_e0540bef-a612-4080-bf0d-1c14658854d5' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider_95cfcba2-0983-4c71-83eb-ebed0f4bd33b' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Infrastructure.IActionInvokerFactory_7b587220-bae2-46e9-90ca-41d122944dd7' resolved as dependency of
	component 'Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler_334960af-4de5-4aad-b50d-e5225121c092' which is the root component being resolved."

This is a fresh installation and a colleague of mine has also tried on his PC and run into the same issue.

Please could someone advise?

Thanks, Kitty

Thanks.

I have sent an email across with a link to our secure file share system containing the project.

Kitty

I tried the above as mentioned but only the navigation steps would change when you clicked the save and continue button. I had to add some code to the wizard.js plugin file so that when you clicked the save and continue button the navigation and the content change.

Hi,

I am currently trying to use "load an entity" with ASP.NET Zero powertools but it is not accepting my connection string.

Please can someone inform me the correct format to use with this?

At the moment I am using it from my appsettings.json, eg. "Server=S15PC-04\SQLEXPRESS; Database=DemoNg5Db; Trusted_Connection=True;"

Thanks!

"Keyword not supported" with whatever is first. I've tried numerous different options.

Hi there I'm trying to load data into a new component after generating an entity using aspnet zero power tools. I've create a customer entity ok and this is shown on the dashboard as a list of customers in a html table format but what I want to do is when I select a row from the customer list to view or edit I want to pass that data to a new custom component I've created that's not a modal like the one that comes out of the box. I've tried to copy the code in the customer modal component but it doesn't work.

Here is the code below customers.component.ts

import{Component, Injector, ViewEncapsulation, ViewChild}from '@angular/core';import{ActivatedRoute}from '@angular/router';import{Http}from '@angular/http';import{CustomersServiceProxy, CustomerDto}from '@shared/service-proxies/service-proxies';import{NotifyService}from '@abp/notify/notify.service';import{AppComponentBase}from '@shared/common/app-component-base';import{TokenAuthServiceProxy}from '@shared/service-proxies/service-proxies';import{CreateOrEditCustomerModalComponent}from './create-or-edit-customer-modal.component';import{ViewCustomerModalComponent}from './view-customer-modal.component';import{appModuleAnimation}from '@shared/animations/routerTransition';import{DataTable}from 'primeng/components/datatable/datatable';import{Paginator}from 'primeng/components/paginator/paginator';import{LazyLoadEvent}from 'primeng/components/common/lazyloadevent';import{FileDownloadService}from '@shared/utils/file-download.service';import * as moment from 'moment';@Component({templateUrl: './customers.component.html', encapsulation: ViewEncapsulation.None, animations: [appModuleAnimation()]})export class CustomersComponent extends AppComponentBase{@ViewChild('createOrEditCustomerModal') createOrEditCustomerModal: CreateOrEditCustomerModalComponent; @ViewChild('viewCustomerModalComponent') viewCustomerModal: ViewCustomerModalComponent; @ViewChild('dataTable') dataTable: DataTable; @ViewChild('paginator') paginator: Paginator; advancedFiltersAreShown=false;filterText='';titleFilter='';firstnameFilter='';lastnameFilter='';homeTelephoneNumberFilter='';mobileTelephoneNumberFilter='';emailAddressFilter='';emergencyContactNumberFilter='';parentTypeFilter='';requestPrescriptionFilter='';address1Filter='';address2Filter='';address3Filter=''; constructor( injector: Injector, private _http: Http, private _customersServiceProxy: CustomersServiceProxy, private _notifyService: NotifyService, private _tokenAuth: TokenAuthServiceProxy, private _activatedRoute: ActivatedRoute, private _fileDownloadService: FileDownloadService ){super(injector);}getCustomers(event?: LazyLoadEvent){if (this.primengDatatableHelper.shouldResetPaging(event)){this.paginator.changePage(0); return;}this.primengDatatableHelper.showLoadingIndicator(); this._customersServiceProxy.getAll(this.filterText,this.titleFilter,this.firstnameFilter,this.lastnameFilter,this.homeTelephoneNumberFilter,this.mobileTelephoneNumberFilter,this.emailAddressFilter,this.emergencyContactNumberFilter,this.parentTypeFilter,this.requestPrescriptionFilter,this.address1Filter,this.address2Filter,this.address3Filter, this.primengDatatableHelper.getSorting(this.dataTable), this.primengDatatableHelper.getSkipCount(this.paginator, event), this.primengDatatableHelper.getMaxResultCount(this.paginator, event) ).subscribe(result=>{this.primengDatatableHelper.totalRecordsCount=result.totalCount; this.primengDatatableHelper.records=result.items; this.primengDatatableHelper.hideLoadingIndicator();});}reloadPage(): void{this.paginator.changePage(this.paginator.getPage());}createCustomer(): void{this.createOrEditCustomerModal.show();}deleteCustomer(customer: CustomerDto): void{this.message.confirm( '', (isConfirmed)=>{if (isConfirmed){this._customersServiceProxy.delete(customer.id) .subscribe(()=>{this.reloadPage(); this.notify.success(this.l('SuccessfullyDeleted'));});}});}exportToExcel(): void{this._customersServiceProxy.getCustomersToExcel(this.filterText,this.titleFilter,this.firstnameFilter,this.lastnameFilter,this.homeTelephoneNumberFilter,this.mobileTelephoneNumberFilter,this.emailAddressFilter,this.emergencyContactNumberFilter,this.parentTypeFilter,this.requestPrescriptionFilter,this.address1Filter,this.address2Filter,this.address3Filter,) .subscribe(result=>{this._fileDownloadService.downloadTempFile(result);});}}

customers.component.html

// This is auto generated using the aspnet zero power tools

viewdetail.component.ts

import{Component, Injector, ViewEncapsulation, ViewChild, Output, EventEmitter}from '@angular/core';import{AppComponentBase}from '@shared/common/app-component-base';import{appModuleAnimation}from '@shared/animations/routerTransition';import{NewOrderModalComponent}from './new-order-modal.component';import{Address}from '../address/address';import{GetCustomerForView, CustomerDto}from '@shared/service-proxies/service-proxies';declare var WizardDemo: any;declare var FormHelper: any;@Component({templateUrl: './viewdetail.component.html', encapsulation: ViewEncapsulation.None, animations: [appModuleAnimation()]})export class ViewdetailComponent extends AppComponentBase{//variables calendarValue: Date deliveryAddres: string dummyAddresses=[] active=false; //Display modal on the customer component when the new order button is clicked. @ViewChild('newOrderModal') newOrderModal: NewOrderModalComponent; @Output() modalSave: EventEmitter<any>=new EventEmitter<any>(); item: GetCustomerForView; constructor( injector: Injector ){super(injector); this.item=new GetCustomerForView(); this.item.customer=new CustomerDto();}ngOnInit(){this.dummyData()}}

viewdetail.component.html doesn't render{{item.customer.firstname}}based on the row selected in the list

{{item.customer.firstname}}

I'm trying to load the data into a new component without using a modal. So it's just another page that shows details. Any ideas. Out of the box it seems to be a modal for a detailed page.

Thank you very much. @alper

After following the steps from the ASP.NET Zero documentation; on logging in to our application (Angular 5, single solution) we are getting the following error in Chrome: "20766Throttling history state changes to prevent the browser from hanging." where the number is constantly incrementing. The loading animation continues and the page does not load and eventually crashes. The warning appears to be on platform-browser.js on history.replaceState (line no. 1770) as this is underlined in red.

We have no other errors in logs, nor when running npm start or building the solution. I am using version 1.7.1 of angular CLI.

Does anyone have any suggestions?

Hi there I have a dropdown button that doesn't disappear when clicked and navigated to a new page. I'm using asp.net zero with a angular5 frontend and bootstrap 4.

Here is the code:

some.component.html

<div class="btn-group dropdown" normalizePosition ng-click="toggle()">
<button class="dropdown-toggle btn btn-sm btn-primary"
        data-toggle="dropdown"
        aria-haspopup="true"
        aria-expanded="false">
    <i class="fa fa-cog"></i><span class="caret"></span> {{l("Edit")}}
</button>
<ul class="dropdown-menu">
    <li>
        <a (click)="openReport(id)">{{l('Run Report')}}</a>
    </li>
</ul>

some.component.ts

openReport(id): void {
    this.router.navigate(['/app/main/report/viewer', id]);
}

When you are navigated to the report viewer page in the browser the button is still showing and I'm not sure how to remove this after it's been clicked. Does anyone have ideas?

Showing 1 to 10 of 49 entries