Skip to content

nebrie/angular-nebri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Angular Nebri

The simple and easy-to-use package for making Nebri api requests from a Angular application.

This app is intended for use with a Nebri instance. Visit https://nebrios.com to sign up for free!

Installation

Copy nebri-angular.js to the appropriate location in your application. The location should be added to the index or base html page. ``` <script src="/path/to/nebri-angular.js"></script> ```

Setup

In app.js, `nebriAngular` should be added to your dependencies. The config section should be updated as well to include your Nebri instance name. ``` angular.module('myApp', [ ..., 'nebriAngular' ]). config([..., 'nebriAngularProvider', function(..., nebriAngularProvider) { ... nebriAngularProvider.setInstanceName(your_instance_name); }]); ``` - instance name is your Nebri instance name. i.e. https://instance_name.nebrios.com

Public Functions

api_request: - api_module: the name of the api module stored on your Nebri instance - view_name: the name of the target function contained in the given api module - method: the desired HTTP request method - payload: an object containing params and values, can be an empty object

Usage Example

NOTE: in order to use this app in a controller, you must include `nebriAngular`. ``` nebriAngular.api_request('greeting_api', 'start_greeting', 'get', {"greeting": "hello"}) .success(function(data){ console.log(data); }).error(function(err){ console.log(err); }); ```

About

Angular Component for NebriOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published