plugins: Create a plugins service with a Plugin definition
This commit is contained in:
parent
7db8e31a7f
commit
1fd6e1b0b6
|
@ -1,7 +1,22 @@
|
||||||
var plugins = angular.module('plugins', []);
|
var plugins = angular.module('plugins', []);
|
||||||
|
|
||||||
|
|
||||||
|
plugins.service('plugins', function() {
|
||||||
|
|
||||||
|
this.Plugin = function(contentForMessage) {
|
||||||
|
|
||||||
|
return {
|
||||||
|
contentForMessage: contentForMessage,
|
||||||
|
exclusive: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
plugins.factory('pluginManager', ['youtubePlugin', 'urlPlugin', 'imagePlugin', function(youtubePlugin, urlPlugin, imagePlugin) {
|
plugins.factory('pluginManager', ['youtubePlugin', 'urlPlugin', 'imagePlugin', function(youtubePlugin, urlPlugin, imagePlugin) {
|
||||||
|
|
||||||
|
|
||||||
var plugins = [youtubePlugin, urlPlugin, imagePlugin]
|
var plugins = [youtubePlugin, urlPlugin, imagePlugin]
|
||||||
|
|
||||||
var hookPlugin = function(plugin) {
|
var hookPlugin = function(plugin) {
|
||||||
|
|
Loading…
Reference in New Issue