我正在使用wordpress Bullhorn插件API来显示我的客户网站之一的carreer门户。但是左侧的过滤器未加载。一切均已在其网站上的Bullhorn管理面板上正确设置。
我在页面检查器中注意到,标记中的data-ng-repeat被注释掉了,这是导致过滤器未显示的原因。发生在“类别和位置”过滤器中。
在此处查看页面:https://nobelrecruitment.com/jobs/
data-ng-repeat="category in filteredCategories = (sidebar.categories | omitFilters:\'category\':sidebar.SearchService.searchParams.category) | limitTo:sidebar.categoryLimitTo track by category.publishedCategory.id">
data-ng-repeat="location in filteredLocations = (sidebar.locations | omitFilters:\'location\':sidebar.SearchService.searchParams.location) | limitTo:sidebar.locationLimitTo | orderBy:\'location.address.city\' track by location.address.city + \',\' + location.address.state">
编辑 完整代码:
$templateCache.put('app/sidebar/sidebar.html','
<aside class="side-bar">
<header>
<label>{{\'sidebar.sidebarHeading\' | i18n}}</label>
<div class="button-container">
<button data-ng-class=
"{\'active\': sidebar.SharedData.gridState === \'list-view\'}"
data-ng-click="sidebar.switchViewStyle(\'list\');"><i class=
"bhi-view-list"></i></button> <button data-ng-class=
"{\'active\': sidebar.SharedData.gridState === \'grid-view\'}"
data-ng-click="sidebar.switchViewStyle(\'grid\');"><i class=
"bhi-view-module"></i></button>
</div>
</header>
<section>
<div class="bh_c_spacer"></div>
<div class="keyword-search">
<label for="keyword"><i class="bhi-search"></i></label> <input class=
"search" data-i18n-attr=
"{placeholder: \'sidebar.sidebarSearchPlaceholder\'}" data-ng-change=
"sidebar.searchOnDelay()" data-ng-model=
"sidebar.SearchService.searchParams.textSearch" id="keyword" name="keyword"
type="text"> <button class="clear-filter" data-ng-click=
"sidebar.clearSearchParamsAndLoadData(\'text\');" data-ng-show=
"sidebar.SearchService.searchParams.textSearch.length" name=
"clear-all"><i class="bhi-times"></i></button>
</div>
<div class="bh_c_spacer"></div>
<section class="filter-section" data-ng-class=
"{\'active\':!sidebar.categoryLimitTo}">
<div class="filter-section-header">
<h4>{{\'common.categorySectionHeading\' | i18n}}</h4><button class=
"clear-filter" data-ng-click=
"sidebar.clearSearchParamsAndLoadData(\'category\');" data-ng-show=
"sidebar.SearchService.searchParams.category.length" name=
"clear-all"><i class="bhi-times"></i> {{\'sidebar.clearButton\' |
i18n}}</button>
</div>
<!-- PROBLEM HERE -->
<div class="filter-item slide-down-item" data-ng-repeat=
"category in filteredCategories = (sidebar.categories | omitFilters:\'category\':sidebar.SearchService.searchParams.category) | limitTo:sidebar.categoryLimitTo track by category.publishedCategory.id"
style="background-color: red; width: 20px; height: 20px;">
<input data-ng-checked="sidebar.hasCategoryFilter(category)"
data-ng-click="sidebar.addOrRemoveCategory(category)" id=
"{{::category.publishedCategory.id}}" type="checkbox"> <label for=
"{{::category.publishedCategory.id}}">{{::category.publishedCategory.name}}</label>
<span>{{category.idCount}}</span>
</div><span class="show-more" data-ng-click=
"sidebar.updateCategoryLimitTo(null)" data-ng-if=
"sidebar.categoryLimitTo && filteredCategories.length > 8">{{\'sidebar.showMoreLabel\'
| i18n}}</span> <span class="show-more" data-ng-click=
"sidebar.updateCategoryLimitTo(8)" data-ng-if=
"!sidebar.categoryLimitTo">{{\'sidebar.showLessLabel\' | i18n}}</span>
</section>
<div class="bh_c_spacer"></div>
<section class="filter-section" data-ng-class=
"{\'active\':!sidebar.locationLimitTo}">
<div class="filter-section-header">
<h4>{{\'common.locationSectionHeading\' | i18n}}</h4><button class=
"clear-filter" data-ng-click=
"sidebar.clearSearchParamsAndLoadData(\'location\');" data-ng-show=
"sidebar.SearchService.searchParams.location.length" name=
"clear-all"><i class="bhi-times"></i> {{\'sidebar.clearButton\' |
i18n}}</button>
</div>
<!-- PROBLEM HERE -->
<div class="filter-item slide-down-item" data-ng-repeat=
"location in filteredLocations = (sidebar.locations | omitFilters:\'location\':sidebar.SearchService.searchParams.location) | limitTo:sidebar.locationLimitTo | orderBy:\'location.address.city\' track by location.address.city + \',\' + location.address.state">
<input data-ng-checked="sidebar.hasLocationFilter(location)"
data-ng-click="sidebar.addOrRemoveLocation(location)" id=
"{{::location.address.city}},{{::location.address.state}}" type=
"checkbox"> <label for=
"{{::location.address.city}},{{::location.address.state}}">{{::location.address.city}}, {{::location.address.state}}</label>
<span>{{location.idCount}}</span>
</div><span class="show-more" data-ng-click=
"sidebar.updateLocationLimitTo(null)" data-ng-if=
"sidebar.locationLimitTo && filteredLocations.length > 8">{{\'sidebar.showMoreLabel\'
| i18n}}</span> <span class="show-more" data-ng-click=
"sidebar.updateLocationLimitTo(8)" data-ng-if=
"!sidebar.locationLimitTo">{{\'sidebar.showLessLabel\' | i18n}}</span>
</section>
<section class="credits">
<span class="powered-by">{{\'sidebar.poweredByText\' | i18n}}</span>
<img class="bullhorn" src="assets/images/logo.svg">
</section><button class="bhi-arrow-left" data-ng-click="sidebar.goBack();"
name="back-arrow" type="button"></button>
</section>
</aside>');}]);