Skip to content

Instantly share code, notes, and snippets.

@philmander
Last active December 11, 2015 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philmander/4514413 to your computer and use it in GitHub Desktop.
Save philmander/4514413 to your computer and use it in GitHub Desktop.
Demonstrates using an interface in the app config
//app-config.js
define(function() {
return {
protos: {
movieLister: {
module: "movies/movie-lister",
args: [
//injects a json movie finder which must implement the movieFinder interface
"*jsonMovieFinder [movieFinder]"
]
},
jsonMovieFinder: {
module: "movies/json-movie-finder"
}
},
interfaces: {
//this interface defines two methods
movieFinder: ["getMovies", "searchMovies"]
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment