https://github.com/irontec/anvil-angular
https://github.com/irontec/anvil-angular
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/irontec/anvil-angular
- Owner: irontec
- License: eupl-1.1
- Created: 2014-12-04T13:53:58.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T14:00:39.000Z (about 7 years ago)
- Last Synced: 2025-01-28T17:07:55.735Z (over 1 year ago)
- Language: JavaScript
- Size: 69.3 KB
- Stars: 1
- Watchers: 19
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# anvil-angular
Angular services for anvil enviroment.
v0.0.* > Anvil
v0.1.0 > Anvil²
## Usage
```javascript
angular
.module('yourapp', ['angular-anvil'])
.run(function runBlock(
$log, $state, $rootScope,
hub, nativeInterface
) {
hub.on('init', function(env) {
$rootScope.$broadcast('hub:init', env);
nativeInterface.showMenuHeader();
});
```
### Available method from native >> JS (hub)
* init(env)
* resume(env)
* notifiyEnviroment(env)
* menuHeaderAction(env)
* menuItemAction(env)
* menuOpened(env)
* menuClosed(env)
* headerLeftButtonAction(env)
* headerRightButtonAction(env)
* showPushNotification(env)
### Available method JS >> native (nativeInterface)
* setTitle
* showLoading
* hideLoading
* openInBrowser
* openExternalApp
* setReauthConfiguration
* setWidgetConfiguration
* setLanguage
* requestEnviroment
* showMenu
* hideMenu
* showHeader
* hideHeader
* showMenuSection
* hideMenuSection
* showMenuItem
* hideMenuItem
* showMenuHeader
* hideMenuHeader
* showHeaderLeftButton
* hideHeaderLeftButton
* showHeaderRightButton
* hideHeaderRightButton