<!-- ### LOOKING FOR MAINTAINER. PLEASE PING [@voronianski](https://twitter.com/voronianski)! -->
# ngDialog
[![build status](http://img.shields.io/travis/likeastore/ngDialog.svg)](https://travis-ci.org/likeastore/ngDialog)
[![npm version](http://badge.fury.io/js/ng-dialog.svg)](http://badge.fury.io/js/ng-dialog)
[![github tag](https://img.shields.io/github/tag/likeastore/ngDialog.svg)](https://github.com/likeastore/ngDialog/tags)
[![Download Count](https://img.shields.io/npm/dm/ng-dialog.svg)](http://www.npmjs.com/package/ng-dialog)
[![Code Climate](https://codeclimate.com/github/likeastore/ngDialog/badges/gpa.svg)](https://codeclimate.com/github/likeastore/ngDialog)
> Modal dialogs and popups provider for [AngularJS](http://angularjs.org/) applications.
ngDialog is ~10KB (minified), has minimalistic API, is highly customizable through themes and has only AngularJS as dependency.
### [Demo](http://likeastore.github.io/ngDialog)
## Install
You can download all necessary ngDialog files manually, or install it with bower:
```bash
bower install ng-dialog
```
or npm:
```bash
npm install ng-dialog
```
## Usage
You need only to include ``ngDialog.js``, ``ngDialog.css`` and ``ngDialog-theme-default.css`` (as minimal setup) to your project and then you can start using the ``ngDialog`` provider in your directives, controllers and services. For example:
```html
<link rel="stylesheet" href="lib/ng-dialog/css/ngDialog.min.css">
<link rel="stylesheet" href="lib/ng-dialog/css/ngDialog-theme-default.min.css">
<script src="lib/ng-dialog/js/ngDialog.min.js"></script>
```
Define the className to be the ``ngDialog-theme-default``.
For example in controllers:
```javascript
var app = angular.module('exampleApp', ['ngDialog']);
app.controller('MainCtrl', function ($scope, ngDialog) {
$scope.clickToOpen = function () {
ngDialog.open({ template: 'popupTmpl.html', className: 'ngdialog-theme-default' });
};
});
```
## Collaboration
Your help is appreciated! If you've found a bug or if something is not clear, please raise an issue.
Ideally, if you've found an issue, you will submit a PR that meets our [contributor guidelines][contributor-guidelines].
### Running Tests
```bash
git clone git@github.com:likeastore/ngDialog.git
cd ngDialog
npm i
npm run test
```
## API
ngDialog service provides easy to use and minimalistic API, but in the same time it's powerful enough. Here is the list of accessible methods that you can use:
===
### ``.open(options)``
Method allows to open dialog window, creates new dialog instance on each call. It accepts ``options`` object as the only argument.
#### Options:
##### ``template {String}``
Dialog template can be loaded through ``path`` to external html template or ``<script>`` tag with ``text/ng-template``:
```html
<script type="text/ng-template" id="templateId">
<h1>Template heading</h1>
<p>Content goes here</p>
</script>
```
```javascript
ngDialog.open({ template: 'templateId' });
```
Also it is possible to use a simple string as template together with ``plain`` option.
##### Pro Tip about templates
It's not always necessary to place your external html template inside ``<script>`` tag. You could put these templates into ``$templateCache`` like this:
```javascript
angular.module('dialog.templates').run(['$templateCache', function($templateCache) {
$templateCache.put('templateId', 'template content');
}]);
```
Then it would be possible to include the ``dialog.templates`` module into the dependencies of your main module and start using this template as ``templateId``.
There is no need to do these actions manually.
You could use one of the plugins specifically for these purposes. They are available for different build systems including most popular Gulp / Grunt:
- [gulp-angular-templatecache](https://github.com/miickel/gulp-angular-templatecache)
- [gulp-ng-html2js](https://www.npmjs.com/package/gulp-ng-html2js)
- [grunt-html2js](https://github.com/karlgoldstein/grunt-html2js)
- [broccoli-html2js](https://www.npmjs.com/package/broccoli-html2js)
You could find more detailed examples on each of these pages.
##### ``plain {Boolean}``
If ``true`` allows to use plain string as template, default ``false``:
```javascript
ngDialog.open({
template: '<p>my template</p>',
plain: true
});
```
##### ``controller {String} | {Array} | {Object}``
Controller that will be used for the dialog window if necessary. The controller can be specified either by referring it by name or directly inline.
```javascript
ngDialog.open({
template: 'externalTemplate.html',
controller: 'SomeController'
});
```
or
```javascript
ngDialog.open({
template: 'externalTemplate.html',
controller: ['$scope', 'otherService', function($scope, otherService) {
// controller logic
}]
});
```
##### ``controllerAs {String} ``
You could optionally specify `controllerAs` parameter for your controller. Then inside your template it will be possible to refer this controller by the value specified by `controllerAs`.
Usage of `controllerAs` syntax is currently recommended by the AngularJS team.
##### ``resolve {Object.<String, Function>}``
An optional map of dependencies which should be injected into the controller.
If any of these dependencies are promises, ngDialog will wait for them all to be resolved
or one to be rejected before the controller is instantiated.
If all the promises are resolved successfully, the values of the resolved promises are
injected.
The map object
is:
- `key` – `{String}`: a name of a dependency to be injected into the controller.
- `factory` - `{String | Function}`: If `String` then it is an alias for a service.
Otherwise if `Function`, then it is injected using `$injector.invoke` and the return
value is treated as the dependency. If the result is a promise, it is resolved
before its value is injected into the controller.
```javascript
ngDialog.open({
controller: function Ctrl(dep) {/*...*/},
resolve: {
dep: function depFactory() {
return 'dep value';
}
}
});
```
##### ``scope {Object}``
Scope object that will be passed to the dialog. If you use a controller with separate ``$scope`` service this object will be passed to the ``$scope.$parent`` param:
```javascript
$scope.value = true;
ngDialog.open({
template: 'externalTemplate.html',
className: 'ngdialog-theme-plain',
scope: $scope
});
```
```html
<script type="text/ng-template" id="externalTemplate.html">
<p>External scope: <code>{{value}}</code></p>
</script>
```
##### ``scope.closeThisDialog(value)``
In addition ``.closeThisDialog(value)`` method gets injected to passed ``$scope``. This allows you to close the dialog straight from the handler in a popup element, for example:
```html
<div class="dialog-contents">
<input type="text"/>
<input type="button" value="OK" ng-click="checkInput() && closeThisDialog('Some value')"/>
</div>
```
Any value passed to this function will be attached to the object which resolves on the close promise for this dialog. For dialogs opened with the ``openConfirm()`` method the value is used as the reject reason.
##### ``data {String | Object | Array}``
Any serializable data that you want to be stored in the controller's dialog scope. (``$scope.ngDialogData``). From version `0.3.6` `$scope.ngDialogData` keeps references to the objects instead of copying them.
Additionally, you will have the dialog id available as ``$scope.ngDialogId``. If you are using ``$scope.ngDialogData``, it'll be also available under ``$scope.ngDialogData.ngDialogId``.
##### ``className {String}``
This option allows you to control the dialog's look, you can use built-in [themes](https://github.com/likeastore/ngDialog#themes) or create your own styled modals.
This example enables one of the built-in ngDialog themes - ``ngdialog-theme-default`` (do not forget to include necessary css files):
```javascript
ngDialog.open({
没有合适的资源?快使用搜索试试~ 我知道了~
PHP开源网站访问统计系统源码下载.zip
共2000个文件
json:2593个
php:2093个
js:584个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 196 浏览量
2022-06-23
15:11:13
上传
评论
收藏 13.05MB ZIP 举报
温馨提示
PHP开源网站访问统计系统源码下载Matomo的前身是Piwik,是一套基于 PHP5 MySQL 技术构建的开源网站访问统计系统。Matomo 可以给你详细的统计信息,比如网页浏览人数,访问最多的页面,搜索引擎关键词等等流量分析功能。此外,它还采用了插件扩展及开放 API 架构,可以让用户根据自已的实际需求创建更多的功能。 Matomo 提供: 100% 数据自主 —— 私有部署方案 灵活性 可靠性和安全性 易用 用户隐私保护 开源 遵循 GDPR 超过 100 个扩展支持 Matomo 为用户提供: 基于 Web 和移动端的分析 交互优化特性 (热力图, 会话记录, AB 测试, 漏洞统计, 表单分析) 访客画像 标签管理 无数据限制 无数据采样 白标报告和定制设计界面 Matomo 的价值: 开放性 自由度 透明度 数据所有权 隐私保护 Kaizen (改善)
资源详情
资源评论
资源推荐
收起资源包目录
PHP开源网站访问统计系统源码下载.zip (2000个子文件)
materialize.css 146KB
materialize.css 146KB
materialize.min.css 106KB
jquery-ui.min.css 25KB
icons.css 7KB
nouislider.css 5KB
jqplot.css 5KB
bootstrap.css 5KB
ngDialog-theme-default.css 4KB
ngDialog-theme-default.min.css 3KB
ngDialog-theme-plain.css 3KB
simple_structure.css 3KB
ngDialog-theme-plain.min.css 3KB
overlay.css 3KB
client.css 3KB
demo.css 3KB
installation.css 2KB
ngDialog.css 2KB
map.css 1KB
ngDialog.min.css 1KB
jquery.jscrollpane.css 1KB
jquery.jscrollpane.css 1KB
jquery.ui.autocomplete.css 1KB
standalone.css 1KB
goals.css 839B
updateLayout.css 683B
jsTrackingGenerator.css 568B
angular-csp.css 343B
showErrorWrongDomain.css 225B
ngDialog-custom-width.css 84B
color_manager.css 42B
font.css 0B
paged-users-list.component.html 13KB
user-permissions-edit.component.html 11KB
user-edit-form.component.html 9KB
dashboard.directive.html 8KB
anonymize-log-data.directive.html 7KB
managegdpr.directive.html 7KB
global-settings.html 5KB
site-fields.html 5KB
period-selector.directive.html 4KB
siteselector.directive.html 4KB
segmentgenerator.directive.html 4KB
trackingfailures.directive.html 3KB
users-manager.component.html 3KB
manage-custom-vars.directive.html 3KB
reportingmenu.directive.html 3KB
campaign-builder.directive.html 3KB
reportexport.popover.html 3KB
site-search-field.html 2KB
opt-out-customizer.directive.html 2KB
quick-access.directive.html 2KB
site.directive.html 2KB
capabilities-edit.component.html 2KB
date-range-picker.component.html 2KB
translationsearch.directive.html 2KB
ratefeature.directive.html 2KB
field-expandable-select.html 2KB
add-site-link.html 2KB
review-links.directive.html 2KB
series-picker.component.html 2KB
multipairfield.directive.html 1KB
enrichedheadline.directive.html 1KB
form-field.directive.html 1KB
menudropdown.directive.html 1KB
single-metric-view.component.html 963B
plugin-settings.directive.html 884B
field-array.directive.html 862B
sites-manager-header.html 833B
widget-bydimension-container.directive.html 822B
field-checkbox-array.html 802B
index.html 766B
feedback-popup.directive.html 751B
field-radio.html 715B
reportingpage.directive.html 698B
angular.html 690B
field-site.html 662B
add-entity-dialog.html 621B
sites-list.html 580B
widget.directive.html 558B
period-date-picker.component.html 528B
content-block.directive.html 461B
field-number.html 456B
field-text.html 455B
field-select.html 412B
widgetloader.directive.html 377B
field-multiselect.html 365B
field-text-array.html 353B
remove-dialog.html 351B
field-textarea-array.html 346B
How to install Matomo.html 341B
notification.directive.html 340B
field-textarea.html 340B
field-checkbox.html 338B
field-file.html 338B
timezone-help.html 334B
field-multituple.html 318B
progressbar.directive.html 303B
save-button.directive.html 296B
widgetcontainer.directive.html 282B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
智慧浩海
- 粉丝: 1w+
- 资源: 5119
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于matlab实现夜间车牌识别程序(1).rar
- 基于matlab实现图像处理,本程序使用背景差分法对来往车辆进行检测和跟踪.rar
- 基于matlab实现视频监控中车型识别代码,自己写的,希望和大家多多交流.rar
- sdk.config
- 基于matlab实现配电网三相潮流计算方法,对几种常用的配电网潮流计算方法进行了对比分析.rar
- 基于matlab实现配电网潮流 经典33节点 前推回代法潮流计算 回代电流 前推电压 带注释.rar
- 基于matlab实现模拟退火遗传算法的车辆调度问题研究,用MATLAB语言加以实现.rar
- 基于matlab实现蒙特卡洛的的移动传感器节点定位算法仿真代码.rar
- 华中数控系统818用户说明书
- 基于matlab实现卡尔曼滤波器完成多传感器数据融合 对多个机器人的不同传感器数据进行融合估计足球精确位置.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0