0.1.1 • Published 7 years ago

ng-wordpress-templates v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

This library contains different templates that can be used by a headless Wordpress application with Angular.

How to use

The templates provided with this library are supposed to work with the corresponding theme/templates on the server side. Therefore, download pschild-angular-wordpress-theme and use it in your Wordpress installation.

First, install the library using

npm i ng-wordpress-templates --save

After that you can import the main module (NgWordpressServicesModule) and any of the template modules you want to use into your AppModule.

The NgWordpressServicesModule expects a configuration (containing URLs etc.) to be passed via forRoot() method. You can either use static values or values read from your environment when you want to provide different values for different build types.

Important: the template modules use the configuration passed via NgWordpressServicesModule.forRoot() and also rely on services provided by this module, so don't forget to call the method.

...
import {
    NgWordpressServicesModule,
    TplTextModule,
    TplGalleryModule,
    ...
} from '@ngWordpressTemplates';

@NgModule({
    ...
    imports: [
        ...
        NgWordpressServicesModule.forRoot({
            apiUrl: environment.apiUrl,
            staticSharerUrl: environment.staticSharerUrl,
            menuName: 'main'
        }),
        TplTextModule,
        TplGalleryModule,
        ...
    ],
    ...
})

Templates

  • Text: TplTextModule
  • Timeline: TplTimelineModule
  • Projects: TplProjectsModule
  • Posts: TplPostsModule
  • Codeblocks: TplCodeblocksModule
  • Gallery: TplGalleryModule
  • TextGallery: TplTextGalleryModule
  • TextMediaSlider: TplTextMediaSliderModule

Services

  • PageService
  • PostService
  • MediaService
  • ProjectsService
  • TimelineService
  • NavigationService

Included Plugins (peer dependencies)

0.1.1

7 years ago

0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago