项目作者: incentro

项目描述 :
Office module for https://github.com/Alfresco/alfresco-ng2-components/
高级语言: JavaScript
项目地址: git://github.com/incentro/shine-office-module.git
创建时间: 2019-04-24T07:01:00Z
项目社区:https://github.com/incentro/shine-office-module

开源协议:MIT License

下载


shine-office-module

WARNING: Version 7.X is not backwards compatible with any version below.

Installation

To install this library, run:

  1. $ npm install shine-office-module --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

  1. $ npm install shine-office-module

and then from your Angular AppModule:

  1. import { BrowserModule } from '@angular/platform-browser';
  2. import { NgModule } from '@angular/core';
  3. import { AppComponent } from './app.component';
  4. // Import your library
  5. import { OfficeModule } from 'shine-office-module';
  6. @NgModule({
  7. declarations: [
  8. AppComponent
  9. ],
  10. imports: [
  11. BrowserModule,
  12. // Specify your library as an import
  13. OfficeModule
  14. ],
  15. providers: [],
  16. bootstrap: [AppComponent]
  17. })
  18. export class AppModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

  1. import {OfficeService} from 'office.service.ts';
  2. @Component({...})
  3. export class MyComponent {
  4. constructor(private officeService: OfficeService)
  5. openFile(entry: NodeMinimal) {
  6. this.officeService.view(entry);
  7. this.officeService.edit(entry);
  8. }
  9. }

API

call params returns
view(entry: NodeMinimal) entry, timout observable
edit(entry: NodeMinimal) entry, timout observable

Development

To generate all *.js, *.d.ts and *.metadata.json files:

  1. $ npm run build

To lint all *.ts files:

  1. $ npm run lint

License

MIT © Kasper Reijnders