Skip to content

Latest commit

 

History

History
executable file
·
116 lines (93 loc) · 5.36 KB

extensions.md

File metadata and controls

executable file
·
116 lines (93 loc) · 5.36 KB

Extensions

Table of Contents

Extensions

  • Extensions consist of 3rd-party or custom code that is integrated into the app.
  • As the name implies, extensions extend the capabilities of your app.
  • There optional extensions that you can install during the install process.
  • Rectangular ships with 1 extension installed by default:
    • The Data extension = ImmutableJS.

Adding Extensions

  • Typically, adding a new extension is as easy as putting services/directives in the extensions folder.

  • A 3rd-party library can be add in the following way extension:

      const exampleVendorService = function exampleVendorService($window) {
      	return $window.exampleLibrary;
      };
    
      angular.module("example.vendor.service", []).factory("serviceName$", exampleVendorService);
    
  • The extension can then be aliased as follows:

      angular.module("example.service", ["example.vendor.service"]);
    

Available Extensions

UI Services

Material Design
  • Learn more about angular-material here.
Sub-services
  • Service is called ui.bottomSheet.service and is injected via bottomSheet$.
  • Service is called ui.colors.service and is injected via colors$.
  • Service is called ui.dialog.service and is injected via dialog$.
  • Service is called ui.icon.service and is injected via icon$.
  • Service is called ui.inkRipple.service and is injected via inkRipple$.
  • Service is called ui.media.service and is injected via media$.
  • Service is called ui.panel.service and is injected via panel$.
  • Service is called ui.sidenav.service and is injected via sidenav$.
  • Service is called ui.sticky.service and is injected via sticky$.
  • Service is called ui.toast.service and is injected via toast$.
Bootstrap
  • Learn more about angular-strap here.
Sub-services
  • Service is called ui.affix.service and is injected via affix$.
  • Service is called ui.alert.service and is injected via alert$.
  • Service is called ui.datepicker.service and is injected via datepicker$.
  • Service is called ui.dropdown.service and is injected via dropdown$.
  • Service is called ui.modal.service and is injected via modal$.
  • Service is called ui.popover.service and is injected via popover$.
  • Service is called ui.scrollspy.service and is injected via scrollspy$.
  • Service is called ui.select.service and is injected via select$.
  • Service is called ui.timepicker.service and is injected via timepicker$.
  • Service is called ui.tooltip.service and is injected via tooltip$.
  • Service is called ui.typeahead.service and is injected via typeahead$.

Arrays, Objects & Strings

  • Service is called _.service and is injected via _.
  • Learn more about Lodash here.

Charts

  • Service is called chart.service and is injected via chart$.
  • Learn more about d3 here.

Date & Time

  • Service is called date.service and is injected via date$.
  • Learn more about angularMoment here.
  • Learn more about MomentJS here.

REST

  • Service is called rest.service and is injected via rest$.
  • The rest$ service can be used in place of $resource.
  • Learn more about restangular here.

Promises

  • Service is called promise.service and is injected via promise$.
  • promise$ can be used in place of $q - it is a speedier and more robust implementation.
  • Learn more about bluebird here.

WebSockets

  • Service is called socket.service and is injected via socket$.
  • Learn more about socket.io-client here.

File Uploading

  • Service is called upload.service and is injected via upload$.
  • Learn more about ng-file-upload here.

Language Support

  • Service is called locale.service and is injected via locale$.
  • Learn more about angular-translate here.

Immutable Data

  • Service is called data.service and is injected via data$.
  • Directive is called data.directive and is added via data-src.
  • Learn more about immutable-js here.

Printing

  • Service is called print.service and is injected via print$.
  • Learn more about teleprint here.