小编use*_*135的帖子

Google Transliterate结果未在Angular Controller中使用的范围内更新

需要一些帮助将Google Transliterate与角度项目集成在一起,下面是将DOM中所有所需元素作为Transliteratable的片段.

function za() {
      google.load("elements", "1", {packages: "transliteration"});
    google.setOnLoadCallback(procTA);
}

// calls the helper function for each of input as well as textarea elememnts in the page
function procTA() {
    procTAHelp('textarea');
    procTAHelp('input');
}

// for each element of xtype (input or textarea), it creates another attribute
// whose name is <xtype><counter>id. That way each element gets a new
// attribute name (which acts as an identifier for the transliteration process
// and a flag which check whether to enable …
Run Code Online (Sandbox Code Playgroud)

javascript google-api angularjs

6
推荐指数
1
解决办法
248
查看次数

标签 统计

angularjs ×1

google-api ×1

javascript ×1