Last active
December 11, 2015 00:09
-
-
Save philmander/4514413 to your computer and use it in GitHub Desktop.
Demonstrates using an interface in the app config
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
//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