Hi guys, Can someone please guide me on how to add components from the downloaded Metronic package to my Angular solution? I have located all the components in the Metronic (metronic-v4.7.5\metronic_v4.7.5\theme\assets\global\plugins). What I am not quiet sure is if I should import components via the npm or I can simply copy its folder to my solution. With the former method, I noticed that not all components exist in npm. With the latter way of copying the folder content, I don't know where is the proper place within the solution to have it pasted.
Thanks for your tips in advance :)
I have found that there is a DatePickerComponent in "app/shared/common/timing/date-picker.component" that as been imported in AppCommonModule. But couldn't locate its usage anywhere within the existing code! Can someone provide me a sample of its usage in a html as of a tag?
cheers
<cite>alper: </cite> see this component
aspnet-zero-core\angular\src\app\shared\common\timing\date-picker.component.ts
Hey alper, Would you be able give me a sample of how to use the DatePickerComponent in a form? I can see that it has already been imported and exported in the AppCommonModule. But did see that it has ever been used!
Hi Guys, Can somebody help with a simple question on how I can implement a 2 way binding on a Date type in Angular 2? I have got property in C# as:
public DateTime StartDate { get; set; }
The following line in Angular 2 does not work!
<input class="form-control" name="startDate" data-provide="datepicker" data-date-format="dd/mm/yyyy" [(ngModel)]="schedule.startDate" />
I noticed that the Swagger has generated the following for the property:
startDate: moment.Moment;
Not sure if I need to do a casting from moment to dateTime. If yes how? I have created a Pipe for date as below:
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
@Pipe({ name: 'datePipe' })
export class DatePipe implements PipeTransform {
transform(date) {
if (date != null) {
let momentdate: moment.Moment = moment(date);
return momentdate.toDate();
}
}
}
But seems we are not allowed to use pipe in [(ngModel)]!
Any thought?
Ah! of course!
Thanks!
Hi, Can somebody help me finding the location of icons in the ASP.Net zero template? I can see that some icons were used in the side navigation bar such as, "icon-globe" etc. Wonder where these css classes are defined and how I would be able to add more to the icons. I have downloaded all the Metronic library but even in there I could not locate the icons!
Thanks for the response. I see what you mean by having a filter applied on showing results. But that does not really restrict users of only modifying their own entities as of someone can simply call an update API method and providing details of an entity which is for others. By the way is applicable in my case as i am using Entity Framework Core!
Any chance that I could achieve it by defining an Attribute? I mean defining a custom Attribute to be applied on each API method, which checks if the user who is about to modify an entity is the owner of it. If was not then throw an error...
Hi, I have already put this question on [https://stackoverflow.com/questions/44937851/restrict-users-to-their-own-entities]) and have received a response but just thought that there might be a feature in the ASPZero product that would take care of it in the better way. Here is the question again: How can we restrict users to their own entities within the Framework? I know that we can check the session Id or include the currentSession in the LINQ query but I kind of wonder if the framework provides a better and efficient way to overcome this?
Regards,
How can we restrict users to their own entities within the Framework? I know that we can check the session Id or include the currentSession in the linq query but I kind of wonder if the framework provides a better and efficient way to overcome this?
I have got a class extending DomainService abstract class as below:
public class ScheduleManager : DomainService, IScheduleManager
The following line does not work:
throw new UserFriendlyException(L("ScheduleIsNotValid"));
because of: Abp.AbpException: Must set LocalizationSourceName before, in order to get LocalizationSource
Just wonder where the proper place if for setting the LocalizationSourceName, like it was set in MyCarParkControllerBase, but in Core (Domain) layer?
By the way the there are 2 usages of localization in the UserRegistrationManager class as:
Line 96 >>> throw new UserFriendlyException(L("UnknownTenantId{0}", tenantId));
Line 101 >>> throw new UserFriendlyException(L("TenantIdIsNotActive{0}", tenantId));
That are failing due to the same issue!
Cheers,