From 1fd6e1b0b6d50795e4471d9c4df68af5a58cd2c2 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Tue, 8 Oct 2013 17:11:05 -0400 Subject: [PATCH] plugins: Create a plugins service with a Plugin definition --- js/plugins.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/plugins.js b/js/plugins.js index 76e7ee7..4c7d88b 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -1,7 +1,22 @@ 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) { + var plugins = [youtubePlugin, urlPlugin, imagePlugin] var hookPlugin = function(plugin) {