我正在尝试实施Siema(https://pawelgrzybek.com/siema/) 但它永远不会奏效。它就像它永远不需要配置并且不会初始化任何东西。 这是angularjs 1.6。 THX。
suggestion.component.js
(function () {
'use strict';
angular
.module('amSuggestions')
.component('suggestionsSlider', {
bindings: {
suggestions: '<'
},
templateUrl: 'suggestions-slider/suggestions-slider.html',
controller: SuggestionsSliderController
});
function SuggestionsSliderController() {
this.$onInit = function () {
var mySiema = new Siema({
selector: '.siema',
perPage: {
768: 2,
992: 4
}
});
};
}
})();
suggestion.jade
.siema
div(ng-repeat="suggestion in $ctrl.suggestions | limitTo: 4")
suggestion(suggestion="suggestion")