Base solution for your next web application

Activities of "acrigney"

Sorry I still don't see why <a class="postlink" href="http://localhost:6634/api/services/app/getFlightsAsync">http://localhost:6634/api/services/app/getFlightsAsync</a>

Doesn't work if I use

DynamicApiControllerBuilder .ForAll<IApplicationService>(typeof(DailyFlightsApplicationModule).Assembly, "app") .Build(); with public interface IFlightsAppService : IApplicationService { Task<GetFlightsOutput> GetFlightsAsync(GetFlightsInput input); Task UpdateFlightAsync(UpdateFlightInput input); Task CreateFlightAsync(CreateFlightInput input);

    GetFlightsOutput GetTest1();
}

Sorry I had no problems when I was using Durandal before for my apps. But with Angular I also have this problem that the services can not be injected into the view models.i.e In the code below the abp.services.app.flight is not found. I get this error. Error: [ng:areq] <a class="postlink" href="http://errors.angularjs.org/1.5.6/ng/areq?p0=df.views.flight.list&p1=not%20a%20function%2C%20got%20undefined">http://errors.angularjs.org/1.5.6/ng/ar ... 0undefined</a>

(function () {

var controllerId = 'app.views.flight.list';
angular.module('app').controller(controllerId, [
    '$scope', 'abp.services.app.flight', 'abp.services.app.gate',    
function ($scope, flightService, gateService) {
    var vm = this;

    vm.localize = abp.localization.getSource('DailyFlights');

    vm.flights = [];
    vm.gates = [];

    vm.refreshGates = function () {                
        abp.ui.setBusy( 
            null,
            flightService.getGatesAsync().success(function(data) {
                vm.gates = data.gates;
            })
        );
    };

    vm.refreshGates();
        $scope.data = {
            selectedGate: null,
            availableGates: vm.gates
        };
        

        $scope.selectedGateId = 0;

        $scope.$watch('selectedGate', function(value) {
            vm.refreshFlights();
        });

        vm.refreshFlights = function () {                
            abp.ui.setBusy( //Set whole page busy until getFlights complete
                null,
                flightService.getFlightsAsync({ //Call application service method directly from javascript
                    AssignedGateId: $scope.selectedGateId > 0 ? $scope.selectedGateId : null,
                    FlightState: null
                }).success(function(data) {
                    vm.flights = data.flights;
                })
            );
        };

        vm.changeFlight = function(flight) {
            
            taskService.updateFlightAsync({
                flightId: flight.id,
                AssignedGateId: selectedGateId,
                ArrivalTime: newArrivalTime,
                DepartureTime: newDepartureTime
            }).success(function() {
                task.state = newState;
                abp.notify.info(vm.localize('FlightUpdatedMessage'));
            });
        };

        vm.getFlightCountText = function() {
            return abp.utils.formatString(vm.localize('XFlights'), vm.flights.length);
        };
    }
]);

})();

Please can you help me!

Best Regards, Alistair

C:\Projects\Products\test\TrueAlliance.Products.Web.Tests\ProductsWebTestBase.cs(53,34): warning CS0114: 'ProductsWebTestBase.GetUrl<TController>(string)' hides inherited member 'AbpAspNetCoreIntegratedTestBase<Startup>.GetUrl<TController>(string)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. 6>C:\Projects\Products\test\TrueAlliance.Products.Web.Tests\ProductsWebTestBase.cs(58,34): warning CS0114: 'ProductsWebTestBase.GetUrl<TController>(string, object)' hides inherited member 'AbpAspNetCoreIntegratedTestBase<Startup>.GetUrl<TController>(string, object)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. 6> Compilation succeeded.>C:\Projects\Products\test\TrueAlliance.Products.Web.Tests\ProductsWebTestBase.cs(53,34): warning CS0114: 'ProductsWebTestBase.GetUrl<TController>(string)' hides inherited member 'AbpAspNetCoreIntegratedTestBase<Startup>.GetUrl<TController>(string)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. 6>C:\Projects\Products\test\TrueAlliance.Products.Web.Tests\ProductsWebTestBase.cs(58,34): warning CS0114: 'ProductsWebTestBase.GetUrl<TController>(string, object)' hides inherited member 'AbpAspNetCoreIntegratedTestBase<Startup>.GetUrl<TController>(string, object)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. 6> Compilation succeeded.

Great to see you are getting into ASP.NET Core but the migration is looking for a .dll however I see that a (Project.EntityFrameworkCore.exe is being created instead? Here is the output from the Package Manager Console \Projects\Products\src\TrueAlliance.Products.Web\Views\Shared\Components\LanguageSelection\LanguageSelectionViewComponent.cs(19,49): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. Could not find assembly '.\bin\src\TrueAlliance.Products.Web\bin\Debug\net461\win7-x86\TrueAlliance.Products.EntityFrameworkCore.dll'.

PM> Add-Migration "Initial" Could not find assembly '.\bin\src\TrueAlliance.Products.Web\bin\Debug\net461\win7-x86\TrueAlliance.Products.EntityFrameworkCore.dll'.

Sorry for rushing this! Yes you just need to change directory in the package management console first then you can do the migration comand. dotnet ef migrations add "initial"

I had a lot of issues trying to get a project running with the latest Angular 1 template. Could you upgrade the sample apps like the SimpleTask app to use the latest nugets please? Also I wasn't clear about the latest breaking changes, could this go in the wiki?

Best Regards, Alistair

I updated the angular nugets to the ones used in the latest template and it worked, but i dont know why my angular is not getting called seems to be a problem with the busy call. I will keep trying. Best Regards, Alistair

Great stuff guys but. Can you recommend us an interim step before we can use Angular 2? Should we go with ng-upgrade? <a class="postlink" href="https://scotch.io/tutorials/seamless-ways-to-upgrade-angular-1-x-to-angular-2">https://scotch.io/tutorials/seamless-wa ... -angular-2</a> <a class="postlink" href="http://blog.rangle.io/upgrade-your-application-to-angular-2-with-ng-upgrade/">http://blog.rangle.io/upgrade-your-appl ... g-upgrade/</a>

Best Regards, Alistair

Answer

Would you also be able to do or extend the asp.net core examples. I am confused about how to post entities. :D

Just wondering if anyone has started to do a template for Aurelia, I would be interested to do it.

Best Regards, Alistair

Showing 21 to 30 of 33 entries