Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
qTip 2 directive for AngularJS.
<script type="text/javascript" src="ng-qtip2.js"></script>
ngQtip2
module in your app.js
's configurationInstall with bower
bower install ng-qtip2
Make sure the file is included in your HTML:
<script type="text/javascript" src="bower_components/ng-qtip2/ng-qtip2.js"></script>
You may override any options for qTip tips globally in your module.
Do this by injecting qtipDefaultsProvider
inside your app's config
stage, and using the setDefaults
method.
Example config stage:
angular.module('myApp', ['ngQtip2']).config(function(qtipDefaultsProvider) {
qtipDefaultsProvider.setDefaults({
position: {
adjust: {
x: 10,
y: 20
}
}
});
});
Interpolated
means you can assign expressions inside using {{expression}}
format to create dynamic content.
Non-interpolated
are immediately evaluated as they are. For example, qtip-visible
expects a boolean
condition expression inside (e.g. qtip-visible="title.length > 0"
or qtip-visible="true"
).
Option | Type | Description |
---|---|---|
qtip | [required] [interpolated] [string] | The qTip content. This can be left blank and overridden with other properties such as qtip-content , qtip-title , qtip-selector , and qtip-template . |
qtip-content | [optional] [interpolated] [string] | The qTip content. Overrides qtip . |
qtip-title | [optional] [interpolated] [string] | When specified, puts the value in qTip's built-in title option. |
qtip-visible | [optional] [boolean] [default=false] | Whether the qTip is visible immediately. |
qtip-disable | [optional] [boolean] [default=false] | Whether the qTip is disabled completely. Useful with ng-repeat and conditions inside the repeater, for example. |
qtip-fixed | [optional] [boolean] [default=true] | Whether the qTip sticks around after the mouse leaves it (up until a certain qtip-delay is reached) |
qtip-delay | [optional] [string|int] [default=100] | How long to wait before the qTip disappears after it becomes inactive when the mouseleave hide event is used (i.e, by default), in ms. |
qtip-adjust-x | [optional] [int] [default=0] | Position the qTip more to the left or right, relatively, in pixels. Use a negative value to move it left. |
qtip-adjust-y | [optional] [int] [default=0] | Position the qTip more to the top or bottom, relatively, in pixels. Use a negative value to move it up. |
qtip-show-effect | [optional] [boolean] [default=true] | If false , will disable animating the showing effect of qTip (this is useful when the dynamic positioning shows a flicker and animates the qTip from the side of the element or screen before positioning it correctly). |
qtip-hide-effect | [optional] [boolean] [default=true] | If false , will disable animating the hiding effect of qTip (this is useful when the dynamic positioning shows a flicker and animates the qTip from the side of the element or screen before positioning it correctly). |
qtip-modal-style | [optional] [object] [default={}] | Set inline style for the qTip. This should be a JS object that contains the JS-esque style properties (such as maxHeight: '100vh' ) |
qtip-tip-style | [optional] [object] [default={}] | Set inline style for the qTip's tip. This should be a JS object that contains the JS-esque style properties (such as maxHeight: '100vh' ), and may also contain tip specific implementations (such as mimic , and corner ). |
qtip-class | [optional] [string] [default=''] | Classes to use for the qTip, you can use these to style the qTip easier with CSS. |
qtip-selector | [optional] [string] [interpolated] | CSS selector for element to use. When specified, the element found using the selector and jQuery will override any other content specified. |
qtip-template | [optional] [string] [interpolated] | Remote template to use for qTip. When specified, the template will be used for the qTip content and will override any other content specified. Use in conjuction with qtip-template-object |
qtip-template-object | [optional] [anyObject] | Will assign a model to the qTip template for use inside the template's content. You can reference this using {{object}} inside the template. |
qtip-event | [optional] [string] [interpolated] [default=mouseover] | What event triggers the qTip to show up. |
qtip-event-out | [optional] [string] [interpolated] [default=mouseout] | What event triggers the qTip to hide after being shown. |
qtip-show | [optional] [object] | Object for the qtip 'show' option (see qTip docs). Will override qtip-event |
qtip-hide | [optional] [object] | Object for the qtip 'hide' option (see qTip docs). Will override qtip-event-out |
qtip-my | [optional] [string] [interpolated] [default=bottom center] | qTip bubble tip position relative to the qTip. "Put my tip at the qTip's..." |
qtip-at | [optional] [string] [interpolated] [default=top center] | qTip bubble tip position relative to the qTip. "Put my tip at the qTip's..." |
qtip-persistent | [optional] [boolean] [default=true] | If false , qTip will be re-rendered next time it is open. |
qtip-options | [optional] [object] | Object for the entire qtip initializer. This will merge itself into the other options specified in this table, overriding any existing keys. This is to explicitly override any options that are not handled the way you expect within these options, or to use options that are not yet implemented. |
qtip-api | [optional] [object] | Pass an empty reference object to this attribute to get back an "api" object (see below for api documentation) |
access the api by adding a scope object to qtip-api
<span qtip="Hi!" qtip-api="tip"></span>
and then access it in your code:
$scope.tip.api().get("position.my")
Because of the way qtip2 works, the api won't be available until you first render it.
This means that it won't be ready until the user showed it (hovered on the associated directive)
or you've passed to the options {prerender: true}
which will force qtip2 to render the qtip on page load.
the qtip-api
object has 3 methods:
isReady()
Returns true/false because of the way qtip2 works, the api won't be available until you first render it. isReady() will tell you if the api object is ready for use
api()
Returns a qtip2 api object for a full documentation about the api object, see: http://qtip2.com/api
apiPromise()
Returns a $q
promise holding the api object upon resolve
example:
$scope.tip.apiPromise().then(function(api) {
console.log(api.get("content"));
});
<span qtip="Hi there, {{name}}!">{{name}}</span>
<span qtip="Woah!" qtip-visible="true">Keanu</span>
<span qtip qtip-template="my_remote_template.html"
qtip-template-object="{person: myPerson, callback: myCallback}">
{{person.name}}
</span>
<span ng-click="object.callback(person)">
Hi {{object.person.name}}, you are {{object.person.age | pluralize:'year'}} old!
</span>
<ul>
<li ng-repeat="person in people track by $index"
qtip="{{$index}}"
qtip-my="{{getQtipMy($index)}}"
qtip-at="top {{$index > 15 ? 'center' : 'bottom'}}">
{{person.name}}
</li>
</ul>
pre-commit.hook
to .git/hooks
FAQs
qTip 2 wrapper directive for AngularJS.
The npm package ng-qtip2 receives a total of 58 weekly downloads. As such, ng-qtip2 popularity was classified as not popular.
We found that ng-qtip2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.