小编Sac*_*ane的帖子

在没有og标签的网站上分享whatsapp上的图像内容和网址

WhatsApp共享一个链接,内容和图像,这可以通过使用og标签,即打开图形标签来完成

<meta property="og:title" content="title" />
<meta property="og:description" content="Description for image" />
<meta property="og:url" content="https://myurl.com" />
<meta property="og:image" content="https://myurl.com/imagepth" />
Run Code Online (Sandbox Code Playgroud)

但这有局限性,我们只能分享一张图片

我想要像facebook sharer链接一样可以共享图像内容的网址

https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmyurl.com%2F
Run Code Online (Sandbox Code Playgroud)

我在一个页面上有图像内容的多个链接我想要在WhatsApp上分享每个块的设置选项,就像facebook sharer一样

使用og tag我们可以从一个页面共享单个图像内容

在此输入图像描述

但我需要单独的链接,以便共享每个块,如上面参考图像上显示的共享按钮

php whatsapi

7
推荐指数
1
解决办法
4463
查看次数

错误:[$ sce:unsafe]尝试在安全上下文中使用不安全的值

我正在尝试将标签存储在本地存储中并在刷新页面前面获取该标签,数据存储在本地,但在控制台上进行竞争时我得到错误

错误:[$ sce:unsafe]尝试在安全上下文中使用不安全的值.

这是我的angularjs代码

$scope.data=$localStorage.$default({
    tab: [{   
        name:'Default 1',
        page: $sce.trustAsHtml('<tab class="portlet" id="internalTabs">first internal</tab>'),
        image: $sce.trustAsHtml('<img style="float : right; " src = "'+token_url+'images/grp1_setting_icon.png" >'), Width: 100
    }]
});
Run Code Online (Sandbox Code Playgroud)

这是我的索引代码

<tabset>
              <tab class="grp_left"
                   ng-model='newTab'
                   sortable-tab
                   ng-repeat="tab in data.tab" 
                   index='{{$index}}' 
                   style='width: {{tab.Width}}%;'
                   id='{{$index}}'
                >
                <tab-heading>
                      {{tab.name}}   <span popover-template="dynamicPopover.templateUrl" popover-placement="bottom" rel="popover"><i ng-bind-html="tab.image"></i></span>

                </tab-heading>
                <!-- below is template of popover for add delete and rename tabs-->
                <script type="text/ng-template" id="myPopoverTemplate.html">
                  <div class="form-group">
                    <label>Enter Title : </label> <span ng-click='closePopup($event)' id='closePopup' ><i class="fa fa-times" style='float:right;'>close</i></span>
                     <input type="text" …
Run Code Online (Sandbox Code Playgroud)

angularjs

4
推荐指数
1
解决办法
7835
查看次数

使用angular.forEach而不是for

我是angularjs的新手,请有人告诉我们如何使用angular.forEach代码

for(i=0;i<$scope.data.tabs.length;i++){ 
   $scope.data.tabs[i]['Position']=i+1;
}
Run Code Online (Sandbox Code Playgroud)

angularjs

2
推荐指数
1
解决办法
4121
查看次数

魔术函数__call函数不起作用

我正在尝试使用魔法函数进行重载

这是我的代码:

类文件1

    class vLiteUser{
        public function __call($methodname,$arguments)
        {
            if($methodname=='UserLogin'){
                switch(count($arguments)){
                    case 1:
                                $this->UserLogin($arguments[0]);
                        break;
                    case 2:
                                $this->UserLogin($arguments[0],$arguments[1]);
                        break;
                    default:    echo "string";
                                break
                }
            }   
        }    

    public function UserLogin($data0='')
    {
        echo $data0;
    }

    public function UserLogin($data0='',$data2='')
    {   
            echo $pass
    }
} ?>
Run Code Online (Sandbox Code Playgroud)

我在另一个文件中创建了对象

 $userObj = new vLiteUser();
 $userObj->UserLogin(data0,data1);
 $userObj->UserLogin(data0);
Run Code Online (Sandbox Code Playgroud)

我可能缺少一些东西,但无法找到它到底是什么

我还想问私有函数是否也包含在重载中。

php overloading

2
推荐指数
1
解决办法
3126
查看次数

标签 统计

angularjs ×2

php ×2

overloading ×1

whatsapi ×1