open-index/open-npm huggingface dataset:
npm package: @ng1/angular-legacy-sortablejs
Description: Angular (legacy) directive for SortableJS.
Author: samjacobclift
Latest version: 0.6.2-1

angular-legacy-sortable
-----------------------

Angular 1 module that integrates with Sortable.js

> 注意：尝试sortablejs版本不能太高，否则报错。这里安装 sortablejs 的 1.6.0 版本测试可以成功。

# Installation

## Install with NPM

    npm install angular-legacy-sortablejs-maintained

## Install with Yarn

    yarn add angular-legacy-sortablejs-maintained

Don't install the old angular-legacy-sortablejs package as thats not maintained

# Examples
[Live Demo](https://example-angularjs-sortable.glitch.me/)

## Simple Drag and Drop

```js
angular.module('exampleApp', ['ng-sortable'])
.component('dragAndDropExample', {
  template: `<ul ng-sortable>
    <li ng-repeat="item in ['burgers', 'chips', 'hotdog']">
      {$ item $}
    </li>
  </ul>`,
})
```

## Specifying a Config
You can pass a Config obj to `ng-sortable` and it will pass this onto the created sortable object. The available options can be found [here](https://github.com/RubaXa/Sortable#options)

```js
angular.module('exampleApp', ['ng-sortable'])
  .component('dragAndDropExample', {
    template: `
    <ul ng-sortable=$ctrl.sortableConf>
      <li ng-repeat="item in ['burgers', 'chips', 'hotdog']">
        {$ item $}
      </li>
    </ul>`,
    controller: class ExampleController {
      constructor() {
        this.sortableConf = {
          animation: 350,
          chosenClass: 'sortable-chosen',
          handle: '.grab-handle',
          forceFallback: true,
        };
      }
    },
  });
```

# Drag handle
Example showing how use the handle option

```js
angular.module('exampleApp', ['ng-sortable'])
  .component('dragAndDropExample', {
    template: `
    <ul ng-sortable=$ctrl.sortableConf>
      <li ng-repeat="item in ['burgers', 'chips', 'hotdog']" draggable="false">
        <span class="grab-handle">Drag Header</span>
        <div>{$ item $}</div>
      </li>
   </ul>`,
   controller: class ExampleController {
      constructor() {
        this.sortableConf = {
          animation: 350,
          chosenClass: 'sortable-chosen',
          handle: '.grab-handle',
          forceFallback: true,
        };
      }
    },
  });
```

# Tests
There are selenium based tests that can be used to check for regressions

## Requirements
  - node
  - yarn

## Setting up tests
Navigate to the repo directory in a terminal and run

    yarn

## Running e2e tests

To run the e2e tests run each of these commands in a separate terminal window

```bash
npm run serve:example
```

```bash
npm run webdriver
```

```bash
npm run test:e2e
```
npm package: @ng1005/chrome-extension-axios
Description: chrome extension axios adapter, a sample axios by runtime message!
Latest version: 0.0.6

# chrome-extension-axios
### Introduction
This is a sample axios for Chrome Extension mv3.Useful to cross in content scripts.
#### Install
```
pnpm install @ng1005/chrome-extension-axios
npm install @ng1005/chrome-extension-axios
yarn add @ng1005/chrome-extension-axios


```
#### ContentScript Used
```
import {axios} from '@ng1005/chrome-extension-axios'
axios.get('xxxx').then(res=>{
  console.log(res)
})

axios.post(url,data,opt)

axios.request({url,method,data})
```
#### Background(work.js) Used
```
import {axios} from '@ng1005/chrome-extension-axios'
axios.listener()
```