Trouble with angularjs and setting up a custom repeater directive -


i'd make custom repeater hang on how custom directives work , i'm not getting errors or warnings i'm not seeing console log either. missing?

html

<ion-item data-ng-repeat="object in objects" customrepeater>     <p>{{ object }}</p> </ion-item> 

directive

angular.module('starter', ['ionic', 'starter.controllers', 'ngcordova'])  .directive("customrepeater", function() {   return {     compile: function(element, attr) {       return function($scope, $element, $attr) {         console.log("log: ", arguments);       };     }   }; }) 

if name directive customrepeater , camelcase notation, in markup need attach element without camelcase

<ion-item hdata-ng-repeat="object in objects" custom-repeater>     <p>{{ object }}</p> </ion-item> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -