laxar-angular-adapter

  • Additionally an axWidgetServices service is available, which can be used by directives to gain access to services that are only available in the context of a specific widget, such as axFeatures , axI18n or the decorated log for widgets ( axLog ).
  • Write LaxarJS widgets and controls with AngularJS
  • As a consequence an error is thrown if this service is used with a scope not being (a child of) a widget scope.
  • In case of the adapter some services are only redefined as AngularJS services to be globally available for other AngularJS services and directives.
  • The widget-adapter for LaxarJS 2 allows to use widgets written in AngularJS 1.x with LaxarJS 2.

Write LaxarJS widgets and controls with AngularJS

@nodenpm: laxar-angular-adapter (0.3.0): Write LaxarJS widgets and controls with AngularJS

Starting with LaxarJS 2, AngularJS is no longer supported (and included) by default. However, this widget-adapter for LaxarJS 2 allows to use widgets written in AngularJS 1.x with LaxarJS 2.

To use the adapter, install it using Bower or npm, and then pass it to

Note that AngularJS 1.x is not well suited to multiple LaxarJS application instances sharing a page. If you need this feature, be sure to pass the AngularJS dependencies of all instances as modules to the first

invocation.

Most services available as injection for widgets are directly provided by the LaxarJS runtime (see http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services). In case of this adapter some services are only redefined as AngularJS services to be globally available for other AngularJS services and directives. The following list covers these:

service is available, which can be used by directives to gain access to services that are only available in the context of a specific widget, such as

axI18n

axLog

). The

is a function, that must be called with scope of the directive and it returns the map of services that are available for the widget being the same as or a parent of the directive scope in the scope hierarchy. As a consequence an error is thrown if this service is used with a scope not being (a child of) a widget scope.

Example:

As it is always the case for controllers, the

$scope

the controller is bound to can be injected. For AngularJS widgets this is exactly the same as the

injection. All widget scopes are child of one specific parent scope and don’t copy the hierarchy or placement of widgets within a page, i.e. all widget scopes are siblings of each other.

Selectively mirror the npm registry inside your firewall. Filter packages based on security, licensing, code quality and more. Build awesome stuff faster. Try npm Enterprise for freeā€¦

laxar-angular-adapter