0.0.23 • Published 4 years ago

@savantly/ngx-sprout-content v0.0.23

Weekly downloads
1
License
-
Repository
-
Last release
4 years ago

ContentModule

Provides Angular components and services to consumer the Sprout Content Module.
The HAL connectivity is provided by - https://github.com/lagoshny/ngx-hal-client

Quickstart

npm install @savantly/ngx-sprout-content

Or all peer dependencies -
npm i @savantly/ngx-jsoneditor @angular/cdk @angular/common @angular/flex-layout @angular/material @lagoshny/ngx-hal-client ng2-ckeditor ngx-markdown-editor rxjs

Add ckeditor and marked modules to your index.html -
`

The Markdown Editor requires FontAwesome to be available -
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

Provide a configuration for the Spring Data Rest endpoint.

import {Injectable} from '@angular/core';
import {ExternalConfigurationHandlerInterface, ExternalConfiguration} from '@lagoshny/ngx-hal-client';
import {HttpClient} from '@angular/common/http';

@Injectable()
export class ExternalConfigurationService implements ExternalConfigurationHandlerInterface {

  getProxyUri(): string {
    return 'http://proxy.url/api/';
  }

  getRootUri(): string {
    return 'https://serviceip.tomcat:8080/APP/';
  }

  getHttp(): HttpClient {
    return this.http;
  }

  constructor(private http: HttpClient) {
  }

  getExternalConfiguration(): ExternalConfiguration {
    return null;
  }

  setExternalConfiguration(externalConfiguration: ExternalConfiguration) {
  }
}

And import in your app module -

  • NgxHalClientModule
  • SproutContentModule
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {NgxHalClientModule} from '@lagoshny/ngx-hal-client';
import {SproutContentModule} from '@savantly/ngx-sprout-content'

import {AppComponent} from './app.component';
import {environment} from '../environments/environment';
import {ExternalConfigurationService} from './ExternalConfigurationService'

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    NgxHalClientModule.forRoot(),
    SproutContentModule
  ],
  providers: [
    {provide: 'ExternalConfigurationService', useClass: ExternalConfigurationService}
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Contributing

This library was generated with Angular CLI version 10.0.6.

Code scaffolding

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

Note: Don't forget to add --project content-module or else it will be added to the default project in your angular.json file.

Build

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

Publishing

After building your library with ng build content-module, go to the dist folder cd dist/content-module and run npm publish.

Running unit tests

Run ng test content-module to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

0.0.23

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago