国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - How to use jquery and other plug-ins in angular2?
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-05-15 17:08:46
0
3
953

How to use jquery and other plug-ins in angular2
For example:
class MyComponent {

constructor() {
    // how to query the DOM element from here?
}

}
Although I have read a few answers, I don’t understand them, and I have failed to try them myself. Please give me some advice

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證高級PHP講師

reply all(3)
某草草

First install jquery

tsd install jquery --save

or

typings install dt~jquery --global --save

Write in the header of the ts file you need to use

declare var $: any;

This way you can use jquery in your ts file

黃舟

Like it, but it is not recommended to use Jquery in angular2, it is easy to be contaminated

滿天的星座

ng2 Don’t use jquery, there is no need
If you pass the dom, just specify it #content in the template

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template