Hi, Is there any plan to add MVC 6 and other new related stuff (Bower, Grunt, ...) to the auto generated project? I have read some about MVC 6.0 and seems there are many changes compared to the old versions. BundleConfig.cs file is one of those changes that has been replaced by Grunt/Gulp files.
Thanks
Hi, I have been recently googling around looking for some Angular directives to include in my app where came across [https://material.angularjs.org/latest/]) and thought that it would be helpful if is included to the project by default ;)
Thats it :)
Hi, I have got a service in Angular as below:
(function () {
angular.module('app').factory('workType', ['abp.services.app.workType',
function (workTypeService) {
var workType = this;
workType.loadWorkTypes = function () {
abp.ui.setBusy(
null,
workTypeService.getWorkTypeList()
.success(function (data)
return data.workTypes;
})
.error(function (message) {
abp.notify.error(message);
})
);
};
return workType;
}
]);
})();
and a controller as
(function () {
var controllerId = 'app.views.configuration.advertisementFields';
angular.module('app').controller(controllerId, ['workType',
function (workTypeService) {
var vm = this;
vm.loadWorkTypes = function () {
var data = workTypeService.loadWorkTypes();
}
}
]);
})();
Here is my web API code:
public GetWorkTypeListOutput GetWorkTypeList()
{
var workTypes = _workTypeRepository.GetAll().ToList();
var workTypeList = new GetWorkTypeListOutput()
{
WorkTypes = Mapper.Map<List<WorkTypeDto>>(workTypes)
};
return workTypeList;
}
When I call the web api through the angular service defined above, the returned data is undefined! I can see that it hit the web API though. I am pretty sure I am making a mistake in line below within the controller, but do not know how to fix it:
var data = workTypeService.loadWorkTypes();
If I call the Web API directly from the controller it will work fine. but I need to call it through a service/factory.
Hi, I have defined two permissions as bellow:
var advertisement = context.CreatePermission(PermissionNames.Advertisement);
advertisement.CreateChildPermission(PermissionNames.Advertisement_CreateAd, L("Advertisement.CreateAd"));
advertisement.CreateChildPermission(PermissionNames.Advertisement_ViewAd, L("Advertisement.ViewAd"));
I am not quite sure how they work though! I am wondering if a role with Advertisement Permission would be able to Create and View ads or I have to grant all three permissions to a role specifically?
Generally, I am wonder how I can grant all defined permissions to an Admin Role efficiently.
Hi, I have got a DTO class defined as:
[AutoMapFrom(typeof(WorkType))]
public class WorkTypeDto : EntityDto
{
public string DisplayName { get; set; }
public bool IsDeleted { get; set; }
public int OrderNumber { get; set; }
public User CreatorUser { get; set; }
}
[AbpAuthorize("Advertisement")]
public GetWorkTypeListOutput GetWorkTypeList()
{
var workTypes = _workTypeRepository.GetAll().ToList();
var workTypeList = new GetWorkTypeListOutput()
{
WorkTypes = Mapper.Map<List<WorkTypeDto>>(workTypes)
};
return workTypeList;
}
and my Angular code is:
vm.loadWorkTypes = function () {
abp.ui.setBusy(
null,
workTypeService.getWorkTypeList()
.success(function (data) {
vm.gridOptions.data = data.workTypes;
})
.error(function (message) {
alert(message);
})
);
};
it is properly populate the DTO to be passed to the Angular, but for some reason it fails without showing any descriptive error message as: [object obeject] and Internal error occurred!
I narrowed down the issue and found out that the CreatorUser property is causing it. If I change its type from User class to string that will work. Any thought?
Hi, I have just created a template through the aspnetboilerplate website and right after I have updated all libraries via Nuget update. In the created template the Configuration class extended ISupportSeedMode which seems was removed from the updated version of Abp.Zero.EntityFramework.
Regards,
Hi, Does anyone know that if its feasible to upload files using Dtos in the Application layer? If yes, can I have a sample code which shows how to define properties in DTO classes and how to call the service from AngularJS?
Thanks,
Hi, I have created an uploading WebApi in the WebApi project. I am using the Api from the Web project to upload files via AngularJS. I have also created a directory and named it as "Document". Here are my wonders:
Where should I define the Document folder (in the WebApi project or the Web one)? I assume it should be in the Web project where the client-side code resides. If my guess is true, then do not know how to point to a folder in the Web project from the WebApi project to save the file in?!
Thanks for your tips and advice in advance ... ;)
Hi I am wondering why the intellisense does not work for helpers within the .chtml files! Besides that, I am getting red curly underlines for any Razor component used within a page. For example for @model, @L, @Html.DropDownListFor, etc...
However they work fine when I compile and run the app
thanks
Hi, I have already placed a ticket regarding this about a year ago. Wonder if you are still going to embed External login (Facebook & Tweeter) to the framework?
Thanks