I don't completely understand what you are trying to do, but I'm guessing
that I might set the tooltip triggers to just use { focus : blur } so that
the tooltip is always open when a user is typing, then change the tooltip
text according to events:
<input type="text" ng-model="inputField.text"
tooltip="{{inputField.tooltip}}" ng-enter="inputField">
//in controller
$scope.inputField = {
text: null,
tooltip = "Please enter a 12 digit number"
}
//on press enter in directive
attrs.inputField.tooltip = "Verifying number..."
//on return from server call when error:
$scope.inputField.tooltip = "Invalid number"
Does this give you the idea?
Otherwise, you can only use basic input events, not customer functions or
custom events to pass to setTriggers()... it won't work. You can look at
the source code here:
https://github.com/angular-ui/bootstrap/blob/gh-pages/ui-bootstrap-0.9.0.js
On Thu, Feb 27, 2014 at 6:12 AM, Sowmiya <[email protected]> wrote:
> Hi,
>
> I'm trying to show the message in popover/tooltip when text box satisfied
> the below conditions
>
> 1.Only allows number and 12 digits too.
>
> Here,
>
> I have created the custom ng-enter directive to allow key code = 13.
> I'm using ng-pattern="/^\d{12}$/" for above mentioned conditions.
>
> Now I have call one method for getting data in server when the above
> conditions are satisfied.
> If that number is not present in server, popover will come with some
> message like "this requested no is not found"
> I have call this popover in method failure callback.
> *Here is the problem*
>
> *when I sent the request,that req will fails and it goes to failure
> callback, but popover does not initialized.SO It wont come.*
> *If I enter 2nd time,it comes.*
>
> *I have trigger th popover like below,*
>
>
>
> *.config(['$tooltipProvider', function($tooltipProvider) {
> $tooltipProvider.setTriggers({ 'keypress': 'mouseleave', 'never':
> 'keydown' });}])*
> *I think its the time delay of calling popover trigger?*
> *Can u solve it?*
>
>
>
>
> On Thursday, 27 February 2014 12:13:39 UTC+5:30, Luke Kende wrote:
>>
>> what do you mean? pretty much all directives are "immediate".
>>
>> ng-bind
>> ng-include
>> ng-show/hide
>> ng-switch
>>
>> and so on
>>
>>
>> On Wednesday, February 26, 2014 8:19:04 AM UTC-7, Sowmiya wrote:
>>>
>>> *Hi,*
>>>
>>> * Is there any directive to affect immediately between controller and
>>> view except ng-model?*
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/DW20vf3nrgM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.