在我的angularjs应用程序中,我有一个用于mibew聊天的脚本,在我的身体里,我的脚本在哪里?
<script type="text/javascript">Mibew.ChatPopup.init({"id":"58cfa9cad9451969","url":"http://steora.com\/mibew-chat\/chat?locale=en&email={{authentication .username}}.com&name={{authentication .username}}","preferIFrame":true,"modSecurity":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/mibew-chat\/chat\/style\/popup"});
我需要设置用户名和电子邮件{{authentication .username}和{{authentication .email}}。
在我的indexCtrl.js中我这样做
$scope.authentication.username = 'Tom';
$scope.authentication.email= 'tom@gmail.com';但这不管用。
有人能告诉我如何调整数据的范围吗?
编辑:我尝试使用@KoIIIeY的解决方案,但是如果我尝试使用它,每次我点击聊天图标时,它就会在新选项卡中打开,而不是弹出,电子邮件和用户名中也没有数据。我需要找到解决方案--如何从控制器传递这些数据
$scope.authentication.username = 'Tom';$scope.authentication.email= 'tom@gmail.com';
敬index.html。
<script type="text/javascript">Mibew.ChatPopup.init({"id":"58cfa9cad9451969","url":"http://steora.com\/mibew-chat\/chat?locale=en&email=_____HERE_____&name=____HERE____","preferIFrame":true,"modSecurity":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/mibew-chat\/chat\/style\/popup"})></script>发布于 2017-03-21 11:18:17
在indexCtrl.js中
$scope.init = function(){
Mibew.ChatPopup.init({"id":"58cfa9cad9451969","url":"http://steora.com\/mibew-chat\/chat?locale=en&email="+$scopeauthentication.email+".com&name="+$scopeauthentication.username+"","preferIFrame":true,"modSecurity":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/mibew-chat\/chat\/style\/popup"});
}在望
<body ng-init="init()"></body>https://stackoverflow.com/questions/42925410
复制相似问题