Giter VIP home page Giter VIP logo

angular-bootstrap's Introduction

Sample abp service proxy generation

Pasos para ingregar la generacion de abp.

  • Install Packages:

    "@abp/ng.core": "^7.2.3", add as dependency "@abp/ng.schematics": "^7.2.3", add as proyect dev

  • Add "skipLibCheck": true in tsconfig.json

  • Add envireoment files.

import { Environment } from '@abp/ng.core';

const baseUrl = 'http://localhost:4200';

export const environment = {
  production: false,
  application: {
    baseUrl,
    name: 'BookStore',
    logoUrl: '',
  },
  oAuthConfig: {
    issuer: 'https://localhost:44327/',
    redirectUri: baseUrl,
    clientId: 'BookStore_App',
    responseType: 'code',
    scope: 'offline_access BookStore',
    requireHttps: true,
  },
  apis: {
    default: {
      url: 'https://localhost:44327',
      rootNamespace: 'Acme.BookStore',
    },
  },
} as Environment;
  • Add custom abp module.
import { ModuleWithProviders, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
  // AuthService,
  BaseCoreModule,
  CoreModule,
  RootCoreModule,
} from '@abp/ng.core';
import { environment } from 'src/environments/environment';
import { registerLocale } from '@abp/ng.core/locale';
// import { AuthCustomService } from '../auth-custom.service';

// hay una version de abp core, ver si se puede usar...
@NgModule({
  declarations: [],
  imports: [
    CommonModule,
    CoreModule.forRoot({
      environment: environment,
      registerLocaleFn: registerLocale(),
    }),
    // BaseCoreModule,
    // RootCoreModule
  ],
})
export class AbpCustomModule {
  static forRoot(): ModuleWithProviders<AbpCustomModule> {
    return {
      ngModule: AbpCustomModule,
      providers: [
        // {
        //   provide: AuthService,
        //   useClass: AuthCustomService,
        // },
        // {
        //   provide: HTTP_INTERCEPTORS,
        //   useExisting: ApiInterceptor,
        //   multi: true,
        // },
        // {
        //   provide: ApiInterceptor,
        //   useClass: JwtBearerApiInterceptor,
        // },
      ],
    };
  }
}
  • Add refence in module.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { AbpCustomModule } from './abp-custom/abp-custom.module';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgbModule,
    AbpCustomModule.forRoot(),
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
  • Finally generate proxy via command

  • Para generar los service proxy y models se hizo uso del comando "abp generate-proxy -t ng", es recomendable que las librerias de backend y front sean tengan la misma version, el generador de proxy de abp, se requiere que sea de la misma verion del proyecto angular.

uninstall tool dotnet tool uninstall -g Volo.Abp.Cli

install tool dotnet tool install -g Volo.Abp.Cli --version 6.0.3

AngularBootstrap

This project was generated with Angular CLI version 16.1.3.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

angular-bootstrap's People

Contributors

washyn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.