从javascript代码调用angular 2函数

时间:2016-08-10 14:04:11

标签: javascript jquery function angular

我需要从javascript调用一个角度2函数。

export class myClass
{
   imageSelected : boolean;


   javascriptFunction()
   {
       this.imageSelected = true // DOESN'T CHANGE IMAGESELECTED STATE...IT'S AN ANGULAR VARIABLE

       //CALL ANGULAR FUNCTION HERE TO CHANGE VARIABLE 
   }

    angular2Function()
    {
        this.imageSelected = true
    }
}

如何在javascriptFunction中调用angular2Function?

0 个答案:

没有答案