我创建了一个简单的小部件来显示Facebook页面上的一个帖子.这是代码:
//VARS
$title = $instance['title'];
$app_id = $instance['add_id'];
$app_secret = $instance['app_secret'];
$page_id = $instance['pade_id'];
$my_url = $instance['my_url'];
$page_name = $instance['page_name'];
$message_lenght = $instance['message_lenght'];
//CONFIGS
// get user access_token
$token_url = 'https://graph.facebook.com/oauth/access_token?client_id='
. $app_id . '&redirect_uri=' . urlencode($my_url)
. '&client_secret=' . $app_secret
. '&grant_type=client_credentials';
// response is of the format "access_token=AAAC..."
$access_token = substr(file_get_contents($token_url), 13);
$fql_query_url = 'https://graph.facebook.com/v2.3/' . $page_id
. '/posts?access_token=' . $access_token;
$fql_query_result = file_get_contents($fql_query_url);
$fql_query_obj = json_decode($fql_query_result, true);
$data = $fql_query_obj['data'][0];
$img_query_url = 'https://graph.facebook.com/v2.3/' . $data['object_id'] . '/?access_token=' …Run Code Online (Sandbox Code Playgroud) 我已经使用ng-repeat创建了该表http://wojtek1150.pl/files/screens/2015_03_29__22-14-19.png
我必须创建过滤器,显示所有记录从A,B或C或...字母开始.我尝试使用ng-click过滤器,但它显示了具有某处过滤字母的记录.有什么建议?
最好的问候,W
@编辑
我用过的所有代码
JS:
var myApp = angular.module('myApp', ['infinite-scroll']);
myApp.controller('DemoController', function($scope) {
$scope.temp = [
<?php $query = new WP_Query( array('post_type' => 'exhibitors', 'posts_per_page' => -1, 'order' => 'ASC')); ?>
<?php $i = 0; if($query->have_posts()) : while($query->have_posts()): $query->the_post();
$categories = get_the_terms( $post->ID, 'company_category' ); $cat_list = array(); foreach ( $categories as $cat ) { $cat_list[] = $cat->name; };
$countries = get_the_terms( $post->ID, 'country' ); $ctr_list = array(); foreach ( $countries as $ctr ) { $ctr_list[] = $ctr->name; …Run Code Online (Sandbox Code Playgroud)