Last active
September 2, 2015 11:58
-
-
Save rolaveric/7858a9ffe37436577cb7 to your computer and use it in GitHub Desktop.
A FalcorJS Model with a HttpDataSource loaded into an AngularJS controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import angular from 'angular'; | |
import falcor from 'falcor'; | |
import HttpDataSource from 'falcor-http-datasource'; | |
class MyController { | |
constructor() { | |
this.model = new falcor.Model({ | |
source: new HttpDataSource('/model.json') | |
}).batch(); // Batches value requests together | |
} | |
} | |
angular.module('falcorExample', []) | |
.controller('MyController', MyController); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment