Base solution for your next web application

Activities of "th3monk3y"

Hi SomnathSwami, In my opinion that is not a good move. Keep your front end separate. This is what's called a separation of concerns.

What I did was turn the angular project (front end) into a VSCode project. I'm using nodeJS to launch chrome browser. There is an extension for VScode called Debugger for Chrome. Using this extension you are able to break in your typescript code. Package management is also much better going this route as you can open a terminal in VsCode much like package manager console in Visual Studio. I've included my VsCode debug configuration for anyone that's interested.

Hope this helps...

{
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",

    "configurations": [
        {
            "name": "Launch Chrome against localhost, with sourcemaps",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:4200",
            // This forces chrome to run a brand new instance, allowing existing
            // chrome windows to stay open.
            "userDataDir": "${workspaceRoot}/.vscode/chrome",
            "sourceMaps": true,
            "webRoot": "${workspaceRoot}",
            //"diagnosticLogging": true,
            "sourceMapPathOverrides": { "webpack:///./*": "${webRoot}/*" }
        },
        {
            "name": "Attach to Chrome, with sourcemaps",
            "type": "chrome",
            "request": "attach",
            "url": "http://localhost:4200",
            "port": 9222,
            "sourceMaps": true,
            "webRoot": "${workspaceRoot}",
            "diagnosticLogging": true,
            "sourceMapPathOverrides": { "webpack:///./*": "${webRoot}/*" }
        }
    ]
}

I was able to resolve this by adding import to root-module.ts. Originally I had it in app.module.ts

Hope this helps someone else.

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

and then add reference in imports

@NgModule({ imports: [ BrowserModule, SharedModule.forRoot(), ModalModule.forRoot(), AbpModule, ServiceProxyModule, RootRoutingModule, BrowserAnimationsModule ],

Answer

If I am understanding you correctly, what you want to do is create a DTO with the data you need and then use AutoMapper to map the returned values from "GetAll" to your DTO.

Look at the existing examples in the boilerplate code. You will need create a mapping in your Application module.

Configuration.Modules.AbpAutoMapper().Configurators.Add(mapper =>
            {
                //Add your custom AutoMapper mappings here...
                //mapper.CreateMap<,>()
                mapper.CreateMap<CustomerDto, Customer>();
            });

I was able to figure this out. (was too tired last night I guess)

I had to check for both impersonator Id's in ng2.

this.isImpersonatedLogin = abp.session.impersonatorTenantId != null || abp.session.impersonatorUserId != null;

There is still a problem in the AuthToken controller with the fore mentioned still not being set in the AbpSession. I'm unable to check for cascading logins by using AbpSession. Looks like I will have to check the cache item or pass them in. The AbpSession worked in MVC. I suspect because the browser was actually visiting the endpoint with the tokenId as a get param and then redirecting.

The Migration-Tool will populate the database tables without removing the prefix. Seed data fails. Will not build with OnModelCreating method in place. Throws an exception.

I have another unrelated question. What happened to the dynamic JS service proxies? Will they not work with core?

thanks

Hi Alistar, I would like to give my two cents on Angular2 and aspnetboilerplate. I hope this helps someone who is on the fence about converting from AngularJS that boilerplate comes with. Again this is just my humble opinion.

I started to convert the software over to angular 2 and ran into waaay too many problems. Angular 2 itself is a half baked mess with breaking changes and beta modules from vendors. The compiled components are huge in file size which forces you to lazy load components if the app is going to have any size to it (large solution). This sounded great until I found out WebPack doesn't support Lazy Loading yet. Breaks the build. That was the final straw for me as I kept hitting walls like this over the 10 days I spent on it. 10 days of wrapping my head around Angular2, fixing all the typescript dependencies in Visual Studio, getting my build scripts just right, building components and so on.

Personally I think I will wait until angular 2 gets all the kinks worked out and even then I don't consider it a good fit for ASP.Net MVC or Core unless you are using the fore mentioned as a middle tier and DAL only. It just doesn't make sense. Razor views are no longer useable and it defeats the purpose of MVC in ASP.Net altogether. I did see a post where you could run the template of a component through the controller to use Razor Views, but I couldn't get it to work. WebPack didn't like that either. At this point I wasn't about to convert over to Gulp and have to start all over.

I think Angular 1 is a good fit and makes sense for ASP MVC. as of this writing.

I am certain moving forward the kinks will get worked out and clever developers will come up with usable patterns for MVC and Core, but as of right now, I have chosen to stay with AngularJs

Paul

Showing 1 to 6 of 6 entries