小编Sur*_*nal的帖子

如何在角4中使用jquery插件

我试图使用这个https://github.com/ShinDarth/Nestable jquery插件来嵌套拖放功能.我已经安装了jquery npm install jquery --save 和来自的npm install @types/jquery --save-dev

import * as $ from 'jquery';在我的组件中声明并在index.html页面中包含插件文件.

这是我的组件代码:

import { Component, OnInit,AfterViewInit,ElementRef } from '@angular/core';
import { MdDialog, MdDialogRef } from "@angular/material";
import { MediaUploadComponent } from '../helper-component/media-upload/media-upload.component';
import * as $ from 'jquery';
// import 'jquery';
// declare const $: JQueryStatic;
// declare var $:any;
// import $ from "jquery";

@Component({
  selector: 'app-appearance',
  templateUrl: './appearance.component.html',
  styleUrls: ['./appearance.component.css']
})
export class AppearanceComponent implements OnInit ,AfterViewInit{ …
Run Code Online (Sandbox Code Playgroud)

javascript jquery angular

0
推荐指数
1
解决办法
4092
查看次数

标签 统计

angular ×1

javascript ×1

jquery ×1