All Projects → StefH → angular-odata-es5

StefH / angular-odata-es5

Licence: MIT license
OData Service for Angular.io (es5 version)

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to angular-odata-es5

ng2-STOMP-Over-WebSocket
STOMP Over WebSocket service for angular2
Stars: ✭ 35 (-22.22%)
Mutual labels:  service, angular2
odata-v4-ng
OData service for Angular
Stars: ✭ 27 (-40%)
Mutual labels:  angular2, odata
perspectiveapi-authorship-demo
Example code to illustrate how to build an authorship experience using the perspective API
Stars: ✭ 62 (+37.78%)
Mutual labels:  angular2
backup-repository
Backup storage for E2E GPG-encrypted files, with multi-user, quotas, versioning, using a object storage (S3/Min.io/GCS etc.) and deployed on Kubernetes or standalone.
Stars: ✭ 21 (-53.33%)
Mutual labels:  service
markdown-to-html-pipe
Angular 2 Pipe that transforms a markdown string to HTML
Stars: ✭ 40 (-11.11%)
Mutual labels:  angular2
leto
Leto: Realtime Application Stack [Angualr2, Rethinkdb/Horizon, ExpressJS] Web | Mobile | Desktop
Stars: ✭ 21 (-53.33%)
Mutual labels:  angular2
ex aws rekognition
Package to use AWS Rekognition service
Stars: ✭ 21 (-53.33%)
Mutual labels:  service
ng2-visualizejs
A simple demonstration that draws a Jaspersoft report/dashboard resource with Visualize.js library using the Angular Framework (aka Angular 2.0)
Stars: ✭ 16 (-64.44%)
Mutual labels:  angular2
ng2-mqtt-demo
Angular 2 demo using MQTT.js in Typescript
Stars: ✭ 32 (-28.89%)
Mutual labels:  angular2
ServiceCommander-IBMi
Service Commander for IBM i
Stars: ✭ 29 (-35.56%)
Mutual labels:  service
ic-datepicker
Angular (2+) datepicker component
Stars: ✭ 27 (-40%)
Mutual labels:  angular2
material2-snippets
Visual studio extension & Intellij plugin for Angular Material 2, Teradata Covalent 1, Angular Flex layout 1 & Material icon snippets
Stars: ✭ 14 (-68.89%)
Mutual labels:  angular2
ui5-cap-event-app
Showcase of SAP Cloud Application Programming Model and OData V4 with draft mode in a freestyle SAPUI5 app and an SAP Fiori elements app.
Stars: ✭ 70 (+55.56%)
Mutual labels:  odata
cloud-speech-and-vision-demos
A set of demo applications that make use of google speech, nlp and vision apis based in angular2
Stars: ✭ 35 (-22.22%)
Mutual labels:  angular2
ssdp-client
The most lightweight asynchronous Java SSDP (Simple Service Discovery Protocol) Client
Stars: ✭ 46 (+2.22%)
Mutual labels:  service
AuthGuard
Example repo for guarding routes post
Stars: ✭ 42 (-6.67%)
Mutual labels:  angular2
Molder
BDD steps libraries for test automation databases, web services, and WebUI
Stars: ✭ 16 (-64.44%)
Mutual labels:  service
ng2-events
Supercharge your Angular2+ event handling
Stars: ✭ 17 (-62.22%)
Mutual labels:  angular2
hedera-hts-demo
This is a demonstration UI for the Hedera Token Service. Written in JavaScript and Vue.JS
Stars: ✭ 66 (+46.67%)
Mutual labels:  service
Coyote
Framework providing operating system abstractions and a range of shared networking (RDMA, TCP/IP) and memory services to common modern heterogeneous platforms.
Stars: ✭ 80 (+77.78%)
Mutual labels:  service

Angular OData Library (es5)

Greenkeeper badge Build Status codecov npm version

Demo

https://StefH.github.io/angular-odata-es5/demo/

Table of contents

About

The goal is to create a fluent API for querying, creating, updating and deleting OData resources in Angular > 2. Note that this library targets 'es5' so that Uglify will work correctly.

Installation

Install through npm:

npm install --save angular-odata-es5

Usage

import { ODataConfiguration, ODataServiceFactory, ODataService } from "angular-odata-es5";
import { bootstrap } from "@angular/platform/browser";
    
@Injectable()
class MyODataConfig extends ODataConfiguration{
    baseUrl="http://localhost:54872/odata/";
}

bootstrap(app, [
    provide(ODataConfiguration, { useClass:MyODataConfig }),
    ODataServiceFactory,
]

//An example model interface
interface INotification {
    Id: number;
    CommentId: number;
    Comment: IComment;
    FromId: number;
    From: IResource;
    Priority: number;
    SendDate: Date;
    IsArchived: boolean;
    Text: string;
}

//An example component
@Component({
  ...
})
export class NotyListComponent {
    private odata: ODataService<INotification>;
    constructor(private odataFactory: ODataServiceFactory, ...) {
        this.odata = this.odataFactory.CreateService<INotification>("notification");
    }
    
    getOneNoty(id: number) {
        this.odata.Get(id).Select("Id,Text").Expand("From,To").Exec()
        .subscribe(
            singleNoty => {...},
            error => {...}
        );
    }

    getNotys(){
        this.odata
            .Query()                    //Creates a query object
            .Top(this.top)
            .Skip(this.skip)
            .Expand('Comment, From')
            .OrderBy('SendDate desc')
            .Filter(this.filterString)
            .Exec()                     //Fires the request
            .subscribe(                 //Subscribes to Observable<Array<T>>
            notys => {
                this.notys = notys;     //Do something with the result
            },
            error => {
                ...                     //Local error handler
            });
    
    }
}

You may also find it useful to view the demo source.

Usage without a module bundler

<script src="node_modules/angular-odata-es5/bundles/angular-odata-es5.umd.js"></script>
<script>
    // everything is exported AngularODataES5 namespace
</script>

Documentation

All documentation is auto-generated from the source via compodoc and can be viewed here: https://StefH.github.io/angular-odata-es5/docs/

Development

Prepare your environment

  • Install Node.js and NPM (should come with)
  • Install local dev dependencies: npm install while current directory is this repo

Development server

Run npm start to start a development server on port 8000 with auto reload + tests.

Testing

Run npm test to run tests once or npm run test:watch to continually run tests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].