Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
(#22) services: removed AngularJS specific axI18n in favor of widge…
Browse files Browse the repository at this point in the history
…t-services version
  • Loading branch information
x1B committed Aug 8, 2016
1 parent bb98c08 commit 0cdad0b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Last Changes

- [#22](https://github.com/LaxarJS/laxar-angular-adapter/issues/22): removed AngularJS specific `axI18n` injection in favor of widget-services version
- [#21](https://github.com/LaxarJS/laxar-angular-adapter/issues/21): fixed bower.json `main` entry
- [#20](https://github.com/LaxarJS/laxar-angular-adapter/issues/20): patched window.Promise to integrate with $q
- [#19](https://github.com/LaxarJS/laxar-angular-adapter/issues/19): removed applyViewChanges in favor of a heartbeat listener
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ The following list covers these:
* [`axGlobalLog`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axgloballog-)
* [`axGlobalStorage`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axglobalstorage-)
* [`axHeartbeat`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axheartbeat-)
* [`axI18n`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axi18n-)
* [`axTooling`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axtooling-)


### axWidgetServices

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`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axfeatures-) or the decorated log for widgets ([`axLog`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axlog-)).
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`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axfeatures-), [`axI18n`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axi18n-) or the decorated log for widgets ([`axLog`](http://laxarjs.org/docs/laxar-v2-latest/manuals/widget_services#-axlog-)).
The `axWidgetServices` 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.

Expand Down
1 change: 0 additions & 1 deletion laxar-angular-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ export function bootstrap( modules, laxarServices ) {
.factory( 'axGlobalLog', () => laxarServices.log )
.factory( 'axGlobalStorage', () => laxarServices.storage )
.factory( 'axHeartbeat', () => laxarServices.heartbeat )
.factory( 'axI18n', () => laxarServices.i18n )
.factory( 'axTooling', () => laxarServices.toolingProviders )
.factory( 'axWidgetServices', () => createWidgetServiceProvider() );
}
Expand Down

0 comments on commit 0cdad0b

Please sign in to comment.