angular service calls content_script
This commit is contained in:
parent
3caa37847a
commit
68dfc3c487
4 changed files with 13 additions and 4 deletions
|
@ -5,8 +5,6 @@ var existingWindowDotAngular = window['angular'];
|
|||
// angular.js to load itself into
|
||||
var angular = (window.angular = {});
|
||||
|
||||
injectScripts();
|
||||
|
||||
function injectScripts () {
|
||||
|
||||
loadScript('vendor/jquery/dist/jquery.js', loadAngular);
|
||||
|
|
|
@ -2,3 +2,9 @@
|
|||
|
||||
@@include('content_script_include.js')
|
||||
|
||||
injectScripts(); //found in the included file
|
||||
|
||||
// will be called within a angular service
|
||||
function storeTagData (tagData) {
|
||||
console.log('storeTagDataInBrowser was called');
|
||||
}
|
|
@ -35,6 +35,7 @@ module tagIt {
|
|||
|
||||
onTagSelect (sense: ISense) {
|
||||
this.selectedWordService.addTagToPage(sense);
|
||||
this.dataService.storeTagingInformation({});
|
||||
}
|
||||
|
||||
onWordSelected = (newWord : string) => {
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
module tagIt {
|
||||
|
||||
//Declare that function is available.
|
||||
//The actual function is found in the content_script
|
||||
declare function storeTagData() : void;
|
||||
|
||||
export class DataService {
|
||||
|
||||
$http : ng.IHttpService;
|
||||
|
@ -27,8 +31,8 @@ module tagIt {
|
|||
|
||||
// save tagging information
|
||||
// Params: email, tagging, sentence
|
||||
storeTaggingInformation (tag : Object) {
|
||||
|
||||
storeTagingInformation (tag : Object) {
|
||||
storeTagData();
|
||||
}
|
||||
|
||||
private createQuery (word: string) {
|
||||
|
|
Loading…
Reference in a new issue