Calling a function when ng-repeat has finished

What I am trying to implement is basically a “on ng repeat finished rendering” handler. I am able to detect when it is done but I can’t figure out how to trigger a function from it. Check the fiddle:http://jsfiddle.net/paulocoelho/BsMqq/3/ JS var module = angular.module(‘testApp’, []) .directive(‘onFinishRender’, function () { return { restrict: ‘A’, link: function … Read more

AngularJS – Create a directive that uses ng-model

I am trying to create a directive that would create an input field with the same ng-model as the element that creates the directive. Here’s what I came up with so far: HTML <!doctype html> <html ng-app=”plunker” > <head> <meta charset=”utf-8″> <title>AngularJS Plunker</title> <link rel=”stylesheet” href=”https://stackoverflow.com/questions/14115701/style.css”> <script>document.write(“<base href=\”” + document.location + “\” />”);</script> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></script> … Read more

Getting “type or namespace name could not be found” but everything seems ok?

I’m getting a: type or namespace name could not be found error for a C# WPF app in VS2010. This area of code was compiling fine, but suddenly I’m getting this error. I’ve tried removing the Project Reference and the using statement, shutting VS2010 and restarting, but still I have this issue. Any ideas why … Read more

How to get evaluated attributes inside a custom directive

I’m trying to get an evaluated attribute from my custom directive, but I can’t find the right way of doing it. I’ve created this jsFiddle to elaborate. <div ng-controller=”MyCtrl”> <input my-directive value=”123″> <input my-directive value=”{{1+1}}”> </div> myApp.directive(‘myDirective’, function () { return function (scope, element, attr) { element.val(“value = “+attr.value); } }); What am I missing? … Read more