Base solution for your next web application

Activities of "acrigney"

The only hard part about integrating the dynamic web API generation with Aurelia Some people are doing CQRS calls like this <a class="postlink" href="http://blog.sapiensworks.com/post/2016/03/19/cqs-api-client-with-aurelia">http://blog.sapiensworks.com/post/2016/ ... th-aurelia</a> But the dynamic Web API is way better!

Yes of course mate and your stuff is awesome, I just don't like Angular1,2,4 etc!! I had not even heard of Angular Universal but I would prefer to use Aurelia!! Here is a framework using Angular Universal <a class="postlink" href="https://github.com/MarkPieszak/aspnetcore-angular2-universal">https://github.com/MarkPieszak/aspnetco ... -universal</a>

I had a lot of trouble getting the aurelia/asp.net core integration working e.g trying examples like this <a class="postlink" href="http://tutaurelia.net/">http://tutaurelia.net/</a> <a class="postlink" href="https://elanderson.net/2016/10/aurelia-with-an-asp-net-core-api/">https://elanderson.net/2016/10/aurelia- ... -core-api/</a> etc Then I had another look and found this! <a class="postlink" href="https://github.com/aspnet/JavaScriptServices/">https://github.com/aspnet/JavaScriptServices/</a> They have Aurelia /ASP.NET Core integration also Angular 2, React etc However this is with ASP.NET Core 1.0.1 which is for VS 2017!!!! If you are new to the change the main difference between VS2015/VS2017 is that project files are reverting back to .csproj files and project.json is gone as these dependencies will be handled by MSBuild in the project file. Anyway at least whatever asp.net boilerplate does it probably needs to use ASP.NET Core 1.0.1. ASP.NET Core is production ready as I understand it, you just use whatever version you want to use in the global.json after you have installed the new version. Anyway I am trying to create a sample app now. Best Regards, Alistair

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

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

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

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

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"

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

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();
}
Showing 1 to 10 of 20 entries