Does the jq plugin removes previously created autocomplete ? (e.g. if
you change the source list, you do elm.autocomplete({..});)
If you want to allow binding to complex expressions (e.g.
selection="some.obj.prop"), you can use $parse:
http://jsfiddle.net/CHVbb/281/
Or in your case, if you are replacing the element, you can create
isolate scope + accessor, then angular will do this parsing for you...
V.
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/angular/-/USI8K9G3yvcJ.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to
> angular+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/angular?hl=en.
I have a question, if put alert() like this
myApp.directive('autocomplete', function($parse) {
return function(scope, element, attrs) {
alert('start');
var setSelection = $parse(attrs.selection).assign;
so when alert fires up it can be seen the curly braces {{obj.name}}
Is it normal functioning for Angular?
This question aroused because if build big table of bindings with ng-repeat there is a flickering affect, displaying table with {{data}} (especially in Opera)
Vitaly
this is because alert is fired before angular compiles the dom (before
it replaces the double curlies with real values).
Check out ng-cloak
http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-cloak
Or you can use ng-bind-template instead of double curlies...
V.
That would be very supportive initiative since a lot of good snippets are scattered around
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/B8p8shWWug8J.
V.
On Mon, Mar 26, 2012 at 1:23 AM, Peter Bacon Darwin