Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "lcyhjx"

Hi,

I use the sample module zero. And I make some changes for entity mode, but i do not execute add-migration and update-database command. So normally, if i invoke a service with DB operation, an exception will be thrown. But in this scenario, when I invoke UserManager.LoginAsync, no exception, no result, just break down, and user do not know what happened.

I have addressed it with a easy way, may be it is not a best practice, but I would like to share it here:

in console application, first I post a HttpWebRequest to <a class="postlink" href="http://localhost:62345/account/login">http://localhost:62345/account/login</a>, then in the response, we can get the cookie with access token.

Then I send the request to <a class="postlink" href="http://localhost:62345/api/services/app/question/GetQuestions">http://localhost:62345/api/services/app ... tQuestions</a>, and put the cookie with access token in the request header.

then question/GetQuestions works fines, the result id returned.

Thanks your clarification, I have used another way to avoid required it.

Thanks so much. Yes, add 'id' to injection list, then it works fine.

Thanks

resolved by using $scope to pass parameter, please see following sample code. But I am still do not know what's the problem when I use resolver to pass parameter.

in index.js

$scope.editRoleId = 0;
            vm.showEditRoleDialog = function (roleId) {
                $scope.editRoleId = roleId;
                var modalInstance = $modal.open({
                    templateUrl: abp.appPath + 'App/Main/views/roles/editDialog.cshtml',                   
                    controller: 'app.views.roles.editDialog as vm',                    
                    size: 'md',
                    scope:$scope,
                });


                modalInstance.result.then(function () {
                    vm.loadRoles();
                });
            };

in modalDialog.js

(function () {
    var controllerId = 'app.views.roles.editDialog';
    angular.module('app').controller(controllerId, [
        'abp.services.app.role', '$modalInstance','$scope',
        function (roleService, $modalInstance,$scope) {
            var vm = this;
            vm.editRoleId = $scope.editRoleId;
        }
    ]);
})();

I found there is an error thrown 'Uncaught TypeError: Cannot read property 'push' of undefined '

Hi,

Abp framework is great. But in few scenarios, I would like to execute sql directly. Is there a way to execute sql directly in Abp framework?

Hi,

I make changes to:

resolve:
                        {
                           id: function () { return roleId; }
                        },

But the value of parameter id still not be passed. Any advice?

Hi, I download module zero, and there is example for using modal dialog to create question. But now, I would like to pass parameter to modal dialog, I use resolve to pass parameter, so I make following change: In index.js

vm.showEditRoleDialog = function (roleId) {
                var modalInstance = $modal.open({
                    templateUrl: abp.appPath + 'App/Main/views/roles/editDialog.cshtml',                   
                    controller: 'app.views.roles.editDialog as vm',
                    resolve:
                        {
                           id: function () { return angular.copy(roleId); }
                        },
                    size: 'md'
                });
            };

And then in modalDialog.js

(function () {
    var controllerId = 'app.views.roles.editDialog';
    angular.module('app').controller(controllerId, [
        'abp.services.app.role', '$modalInstance',
        function (roleService, $modalInstance,id) {
            var vm = this;
            vm.id = id;
            vm.role = null;
        }
    ]);
})();

But the value of parameter id is not passed, could you please give me some suggestion?

Showing 31 to 40 of 54 entries