sourcecode

Angular와 함께 jQuery를 사용하는 방법은 무엇입니까?

codebag 2023. 4. 28. 20:33
반응형

Angular와 함께 jQuery를 사용하는 방법은 무엇입니까?

Angular에서 jQuery사용하는 방법을 알려줄 수 있는 사람?

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

DOM 요소의 클래스나 ID를 사전에 조작하는 것과 같은 해결 방법이 있다는 것을 알고 있지만, 더 깨끗한 방법을 원합니다.

Angular2의 jQuery를 사용하는 것은 ng1에 비해 쉬운 일입니다.TypeScript를 사용하는 경우 먼저 jQuery 유형 스크립트 정의를 참조할 수 있습니다.

tsd install jquery --save
or
typings install dt~jquery --global --save

사용할 수 있기 하지 않습니다.any의 타입으로서.$또는jQuery

.@ViewChild()에는 보를초후에를 할 수 .nativeElement이 개체의 속성을 입력하고 jQuery에 전달합니다.

을 선언하는 중$(또는)jQuery에 대한 JQueryStatic은 jQuery에 대한 입력된 참조를 제공합니다.

import {bootstrap}    from '@angular/platform-browser-dynamic';
import {Component, ViewChild, ElementRef, AfterViewInit} from '@angular/core';
declare var $:JQueryStatic;

@Component({
    selector: 'ng-chosen',
    template: `<select #selectElem>
        <option *ngFor="#item of items" [value]="item" [selected]="item === selectedValue">{{item}} option</option>
        </select>
        <h4> {{selectedValue}}</h4>`
})
export class NgChosenComponent implements AfterViewInit {
    @ViewChild('selectElem') el:ElementRef;
    items = ['First', 'Second', 'Third'];
    selectedValue = 'Second';

    ngAfterViewInit() {
        $(this.el.nativeElement)
            .chosen()
            .on('change', (e, args) => {
                this.selectedValue = args.selected;
            });
    }
}

bootstrap(NgChosenComponent);

다음 예제는 플런커에서 사용할 수 있습니다. http://plnkr.co/edit/Nq9LnK?p=preview

는 tslint에 대해 입니다.chosen에 사용자 *. 파일 $에 하여 이 를 해결할 수 .

interface JQuery {
    chosen(options?:any):JQuery;
}    

이것이 저에게 효과가 있었습니다.

1단계 - 가장 먼저 해야 할 일

// In the console
// First install jQuery
npm install --save jquery
// and jQuery Definition
npm install -D @types/jquery

2단계 - 가져오기

// Now, within any of the app files (ES2015 style)
import * as $ from 'jquery';
//
$('#elemId').width();

// OR

// CommonJS style - working with "require"
import $ = require('jquery')
//
$('#elemId').width();

- #업데이트 -Feb - 2017

최근에, 저는 코드를 쓰고 있습니다.ES6typescript 할수있 할 수 .import 없이* as $에 시대에import statement다음은 현재의 모습입니다.

import $ from 'jquery';
//
$('#elemId').width();

행운을 빌어요.

왜 모두가 그것을 로켓 과학으로 만드나요?를 들어 요소들에 인 것들을 , 예를 들어, 예를들어요, 적에인작적업을위수해행야을사하, 정소대람들다른는해본한기▁else▁for▁elements,,위▁static해▁needs▁who▁stuff▁some,body태그, 다음과 같이 하십시오.

  1. index. add in index.html 가scriptjquery lib의 경로가 있는 태그는 어디에 있든 상관 없습니다. (이렇게 하면 IE 조건부 태그를 사용하여 IE9 이하의 jquery 하위 버전을 로드할 수도 있습니다.)
  2. 의 신의에서.export component은 당신의 : 블에는코호기있능습니다이는출하드.$("body").addClass("done");으로 이 오류가 하므로 이 파일의 에 일적으로이것선오유류발이므로.ts다하반추니가합직후져에가를 추가합니다.declare var $:any;그리고 당신은 가도 좋습니다!

이제는 매우 쉬워졌습니다. Angular2 컨트롤러 안에 있는 모든 유형의 jQuery 변수를 선언하면 됩니다.

declare var jQuery:any;

가져오기 문 바로 뒤와 구성요소 장식기 앞에 추가합니다.

ID가 X 또는 클래스 X인 요소에 액세스하려면 다음 작업만 수행하면 됩니다.

jQuery("#X or .X").someFunc();

간단한 방법:

스크립트 포함

색인.

<script type="text/javascript" src="assets/js/jquery-2.1.1.min.js"></script>

선언하다

my.component.ts

declare var $: any;

쓰임

@Component({
  selector: 'home',
  templateUrl: './my.component.html',
})
export class MyComponent implements OnInit {
 ...
  $("#myselector").style="display: none;";
}

다음과 같은 간단한 단계를 따르십시오.그것은 나에게 효과가 있었다.혼동을 피하기 위해 새로운 각도 2 앱부터 시작하겠습니다.Angular cli를 사용하고 있습니다.그래서, 만약 당신이 그것을 가지고 있지 않다면, 그것을 설치하세요.https://cli.angular.io/

1단계: 데모 각도 2 앱 만들기

ng new jquery-demo

어떤 이름이든 사용할 수 있습니다.이제 cmd 이하로 실행하여 작동하는지 확인합니다.(이제 cd 명령을 사용하지 않으면 'jquery-demo'를 가리키고 있는지 확인하십시오.)

ng serve

브라우저에 "앱 작동!"이 표시됩니다.

2단계: 바우어 설치(웹용 패키지 관리자)

cli에서 이 명령을 실행합니다(cd 명령을 사용하지 않는 경우 'jquery-demo'를 가리키고 있는지 확인하십시오).

npm i -g bower --save

이제 bower 설치가 완료되면 다음 명령을 사용하여 'bower.json' 파일을 만듭니다.

bower init

입력을 요청합니다. 기본값을 원하는 경우 모두에 대해 Enter 키를 누르고 마지막에 "좋아 보이나요?"라고 묻는 메시지가 나타나면 "예"를 입력합니다.

이제 "jquery-demo" 폴더에서 새 파일(bower.json)을 볼 수 있습니다.https://bower.io/ 에서 더 많은 정보를 찾을 수 있습니다.

3단계: jquery 설치

이 명령 실행

bower install jquery --save

jquery 설치 폴더를 포함하는 새 폴더(bower_components)를 만듭니다.이제 jquery가 'bower_components' 폴더에 설치되었습니다.

4단계: 'angular-cli.json' 파일에 jquery 위치 추가

'angular-cli.json' 파일('jquery-demo' 폴더에 있음)을 열고 "scripts"에 jquery 위치를 추가합니다.다음과 같이 표시됩니다.

"scripts": ["../bower_components/jquery/dist/jquery.min.js"
              ]

5단계: 테스트를 위한 간단한 jquery 코드 작성

'app.component.html' 파일을 열고 간단한 코드 줄을 추가하면 파일은 다음과 같습니다.

<h1>
  {{title}}
</h1>
<p>If you click on me, I will disappear.</p>

이제 'app.component.ts' 파일을 열고 'p' 태그에 대한 jquery 변수 선언 및 코드를 추가합니다.라이프사이클 후크 AfterViewInit()도 사용해야 합니다.변경 후 파일은 다음과 같이 표시됩니다.

import { Component, AfterViewInit } from '@angular/core';
declare var $:any;

@Component({
     selector: 'app-root',
     templateUrl: './app.component.html',
     styleUrls: ['./app.component.css']
})
export class AppComponent {
     title = 'app works!';

     ngAfterViewInit(){
           $(document).ready(function(){
             $("p").click(function(){
             $(this).hide();
             });
           });
     }
}

이제 'ng serve' 명령을 사용하여 각진 2 앱을 실행하고 테스트합니다.그건 작동할 거야.

Angular CLI 사용

 npm install jquery --save

스크립트 배열 아래의 angular.json

"scripts": [ "node_modules/jquery/dist/jquery.min.js" ] // copy relative path of node_modules>jquery>dist>jquery.min.js to avoid path error

이제 jQuery를 사용하려면 jQuery를 사용할 구성 요소에서 다음과 같이 가져오기만 하면 됩니다.

루트 구성 요소에서 jQuery 가져오기 및 사용 예

import { Component, OnInit  } from '@angular/core';
import * as $ from 'jquery'; // I faced issue in using jquery's popover
Or
declare var $: any; // declaring jquery in this way solved the problem

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {


ngOnInit() {
}

jQueryExampleModal() { // to show a modal with dummyId
   $('#dummyId').modal('show');
}

라이프사이클 후크 AfterViewInit()를 구현하여 DOM 조작을 추가할 수 있습니다.

ngAfterViewInit() {
            var el:any = elelemtRef.domElement.children[0];
            $(el).chosen().on('change', (e, args) => {
                _this.selectedValue = args.selected;
            });
}

angular2는 보기를 재활용할 수 있으므로 라우터를 사용할 때 주의하십시오.따라서 DOM 요소 조작은 afterView의 첫 번째 호출에서만 수행되어야 합니다.Init ... (정적 부울 변수를 사용하여 이를 수행할 수 있습니다)

class Component {
    let static chosenInitialized  : boolean = false;
    ngAfterViewInit() {
        if (!Component.chosenInitialized) {
            var el:any = elelemtRef.domElement.children[0];
            $(el).chosen().on('change', (e, args) => {
                _this.selectedValue = args.selected;
            });
            Component.chosenInitialized = true;
        }
    }
}

angular-cli를 사용하면 다음을 수행할 수 있습니다.

  1. 종속성 설치:

    npm 설치 jquery --저장

    npm 설치 @types/jquery --save-dev

  2. 파일 가져오기:

    .angular-cli.json 파일의 "script" 섹션에 ".../node_modules/jquery/dist/jquery.min.js"를 추가합니다.

  3. jquery 선언:

    tsconfig.app.json의 "types" 섹션에 "$"를 추가합니다.

자세한 내용은 공식 각진 클리닉에서 확인할 수 있습니다.

1단계: npm install jquery --save 명령을 사용합니다.

2단계: 각도를 다음과 같이 간단히 가져올 수 있습니다.

'jquery'에서 $ 가져오기;

그게 다야

예를 들어 다음과 같습니다.

import { Component } from '@angular/core';
import  $ from 'jquery';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})

export class AppComponent {
  title = 'app';
  constructor(){
    console.log($('body'));
  }


}

콘솔에서 를 설치합니다: 나는그것더간단방로를 - 으콘로 npm에 jquery다치.npm install jquery -S 구성 요소 에 다음과 같이.let $ = require('.../jquery.min.js')효과가 있습니다!다음은 일부 내 코드의 전체 예입니다.

import { Component, Input, ElementRef, OnInit } from '@angular/core';
let $ = require('../../../../../node_modules/jquery/dist/jquery.min.js');

@Component({
    selector: 'departments-connections-graph',
    templateUrl: './departmentsConnectionsGraph.template.html',
})

export class DepartmentsConnectionsGraph implements OnInit {
    rootNode : any;
    container: any;

    constructor(rootNode: ElementRef) {
      this.rootNode = rootNode; 
    }

    ngOnInit() {
      this.container = $(this.rootNode.nativeElement).find('.departments-connections-graph')[0];
      console.log({ container : this.container});
      ...
    }
}

예를 들어 제가 가지고 있는 템플릿:

<div class="departments-connections-graph">something...</div>

편집

또는 다음을 사용하는 대신:

let $ = require('../../../../../node_modules/jquery/dist/jquery.min.js');

사용하다

declare var $: any;

인덱스에 다음과 같이 입력합니다.

<script src="assets/js/jquery-2.1.1.js"></script>

이렇게 하면 jquery가 글로벌하게 한 번만 초기화됩니다. 예를 들어 부트스트랩에서 모달 창을 사용하는 경우에 중요합니다.

설치//jquery 설npm install jquery --save

//jquery에 유형 typings install dt~jquery --global --save

//jquery 라이브러리를 지정된 대로 빌드 구성 파일로 가져옵니다("build-cli-build.js" 파일).

vendorNpmFiles: [
  .........
  .........
  'jquery/dist/jquery.min.js'
]

합니다. //build의 jquery 라이브러리를 추가합니다.ng build

경로 system-config // 경로 구성(system-config.js)을 지정합니다./** Map relative paths to URLs. */ const map: any = { ....., ......., 'jquery': 'vendor/jquery/dist' };

/** User packages configuration. */
const packages: any = {
......,
'jquery':{ main: 'jquery.min',
format: 'global',
defaultExtension: 'js'}};

//구성요소 파일의 jquery 라이브러리 가져오기

import 'jquery';

아래는 샘플 구성요소의 코드 스니펫입니다.

import { Component } from '@angular/core';
import 'jquery';
@Component({
  moduleId: module.id,
  selector: 'app-root',
  templateUrl: 'app.component.html',  
  styleUrls: ['app.component.css']
})
export class AppComponent {
  list:Array<number> = [90,98,56,90];
  title = 'app works!';
  isNumber:boolean = jQuery.isNumeric(89)  
  constructor(){}
}

Angular2(4)에서 Jquery를 사용하려면

다음 설정을 따릅니다.

Jquery 및 Juqury 유형 정의 설치

설치의 경우 Jquery 파일을 하십시오.npm install jquery --save

definition Installation의 경우 Jquery 파일을 하십시오.npm install @types/jquery --save-dev

그런 다음 jquery를 가져오기만 하면 됩니다.

import { Component } from '@angular/core';
import * as $ from 'jquery';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent { 
  console.log($(window)); // jquery is accessible 
}

먼저 다음과 같이 npm을 사용하여 jQuery를 설치합니다.

npm install jquery — save

다음으로 Angular CLI 프로젝트 폴더의 루트에 있는 ./angular-cli.json 파일로 이동하여 스크립트: [] 속성을 찾고 다음과 같이 jQuery의 경로를 포함합니다.

"scripts": [ "../node_modules/jquery/dist/jquery.min.js" ]

이제 jQuery를 사용하려면 jQuery를 사용할 구성 요소로 가져오기만 하면 됩니다.

import * as $ from 'jquery';
(or)
declare var $: any;

아래 코드에서 jQuery를 사용하여 특히 두 번째 줄에 있는 div on click을 애니메이션화합니다.우리는 모든 것을 jQuery에서 $로 수입하고 있습니다.

import { Component, OnInit  } from '@angular/core';
import * as $ from 'jquery';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'Look jQuery Animation working in action!';

  public ngOnInit()
  {
    $(document).ready(function(){
        $("button").click(function(){
            var div = $("div");  
            div.animate({left: '100px'}, "slow");
            div.animate({fontSize: '5em'}, "slow");
        });
    });
  }
}

제가 둔한 사람이기 때문에, 저는 작동 코드가 있으면 좋을 것이라고 생각했습니다.

또한 Angular2 typing 버전의 Angular-protector는 jQuery에 문제가 있습니다. $그래서 승인된 상위 답변은 저에게 깨끗한 컴파일을 제공하지 않습니다.

제가 작업해야 할 단계는 다음과 같습니다.

색인.

<head>
...
    <script   src="https://code.jquery.com/jquery-3.1.1.min.js"   integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="   crossorigin="anonymous"></script>
...
</head>

my.component.ts 내부

import {
    Component,
    EventEmitter,
    Input,
    OnInit,
    Output,
    NgZone,
    AfterContentChecked,
    ElementRef,
    ViewChild
} from "@angular/core";
import {Router} from "@angular/router";

declare var jQuery:any;

@Component({
    moduleId: module.id,
    selector: 'mycomponent',
    templateUrl: 'my.component.html',
    styleUrls: ['../../scss/my.component.css'],
})
export class MyComponent implements OnInit, AfterContentChecked{
...
    scrollLeft() {

        jQuery('#myElement').animate({scrollLeft: 100}, 500);

    }
}

이전에 생성된 모든 게시물에 이 점이 언급되어 있어서 jquery 설치를 건너뜁니다.이미 jquery를 설치했습니다.이렇게 구성 요소로 t 가져오기

import * as $ from 'jquery';

이 기능은 작동하지만 서비스를 생성하여 이를 수행하는 또 다른 '상당한' 방법이 있습니다.

1단계: jquery.service.ts 파일을 만듭니다.

// in Angular v2 it is OpaqueToken (I am on Angular v5)
import { InjectionToken } from '@angular/core';
export const JQUERY_TOKEN = new InjectionToken('jQuery');

2단계: app.module.ts에 서비스를 등록합니다.

import { JQUERY_TOKEN } from './services/jQuery.service';
declare const jQuery: Object;

providers: [
    { provide: JQUERY_TOKEN, useValue: jQuery },
]

단계 번호.3: 서비스를 구성 요소 my-super-dupper.component.ts에 주입합니다.

import { Component, Inject } from '@angular/core';

export class MySuperDuperComponent {
    constructor(@Inject(JQUERY_TOKEN) private $: any) {}

    someEventHandler() {
        this.$('#my-element').css('display', 'none');
    }
}

서비스로서의 디제이쿼리 대 'jquery'에서 $로 가져오기 * 두 가지 방법의 장단점을 설명해 주시면 감사하겠습니다.

그냥 쓰기

declare var $:any;

모든 가져오기 섹션 후에 jQuery를 사용하고 index.html 페이지에 jQuery 라이브러리를 포함할 수 있습니다.

<script src="https://code.jquery.com/jquery-3.3.1.js"></script>

그것은 나에게 효과가 있었다.

앵귤러

npm i jquery

중요합니다: 이은중요니다합것다.npm i @types/jquery

각진.json

"scripts": [
              "node_modules/jquery/dist/jquery.min.js"
            ]

.ts 파일

import * as $ from "jquery";

다른 사람들은 이미 게시했습니다.새로운 사람들에게 도움이 될 수 있도록 간단한 예를 들어보겠습니다.

1단계: index.html 파일 참조 jquery cdn

     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>

2단계: 버튼을 클릭하면 div 또는 hide div를 표시한다고 가정합니다.

 <input type="button" value="Add New" (click)="ShowForm();">


 <div class="container">
  //-----.HideMe{display:none;} is a css class----//

  <div id="PriceForm" class="HideMe">
     <app-pricedetails></app-pricedetails>
  </div>
  <app-pricemng></app-pricemng>
 </div>

3단계:아래의 구성 요소 파일에서 $ 가져오기를 아래와 같이 선언합니다.

declare var $: any;

아래와 같은 기능을 생성하는 것보다:

 ShowForm(){
   $('#PriceForm').removeClass('HideMe');
 }

최신 Angular 및 JQuery와 함께 작동합니다.


구성 요소의 DOM에 액세스합니다.

import {BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter';
constructor(el: ElementRef,public zone:NgZone) {
     this.el = el.nativeElement;
     this.dom = new BrowserDomAdapter();
 }
 ngOnInit() {
   this.dom.setValue(this.el,"Adding some content from ngOnInit"); 
 }

다음 방법으로 jQuery를 포함할 수 있습니다. 2) angular2 loads 앞에 jquery 파일을 index.html에 포함합니다.

      <head>
    <title>Angular 2 QuickStart</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="styles.css">

    <!-- jquery file -->
    <script src="js/jquery-2.0.3.min.js"></script>
    <script src="js/jquery-ui.js"></script>
    <script src="node_modules/es6-shim/es6-shim.min.js"></script>
    <script src="node_modules/zone.js/dist/zone.js"></script>
    <script src="node_modules/reflect-metadata/Reflect.js"></script>
    <script src="node_modules/systemjs/dist/system.src.js"></script>
    <script src="systemjs.config.js"></script>
    <script>
      System.import('app').catch(function(err){ console.error(err); });
    </script>
  </head>

JQuery를 사용할 수 있는 방법은 다음과 같습니다. JQuery UI 달력 보기를 사용합니다.

    import { Directive, ElementRef} from '@angular/core';
    declare  var $:any;
    @Directive({
      selector: '[uiDatePicker]',
     })
    export class UiDatePickerDirective {
      private el: HTMLElement;
      constructor(el: ElementRef) {
        this.el = el.nativeElement;

     }

    ngOnInit() {
        $(this.el).datepicker({
         onSelect: function(dateText:string) {
            //do something on select
         }
        });
    }
}

이 일은 나에게 효과가 있습니다.

여기에 공식 문서로 글로벌 라이브러리 설치

  1. npm에서 설치:

    npm install jquery --save

  2. 스크립트에 필요한 스크립트 파일 추가:

    "scripts": [ "node_modules/jquery/dist/jquery.slim.js" ],

서버를 실행 중인 경우 서버를 다시 시작합니다. 그러면 서버가 앱에서 작동해야 합니다.


내부에서 단일 구성요소를 사용하려면 구성요소 내부에서 사용합니다.

내가 찾은 가장 효과적인 방법은 페이지/구성요소 생성자 내부에서 시간이 0인 setTimeout을 사용하는 것입니다.Angular가 모든 하위 구성 요소 로드를 완료한 후 다음 실행 사이클에서 jQuery를 실행합니다.몇 가지 다른 구성 요소 방법을 사용할 수 있지만 setTimeout 내에서 실행할 때 가장 잘 작동합니다.

export class HomePage {
    constructor() {
        setTimeout(() => {
            // run jQuery stuff here
        }, 0);
    }
}

이것이 저에게 효과가 있었던 것입니다 - 웹팩이 있는 Angular 2.

나는 선언하려고 했습니다.$활자로any하지만 JQuery 모듈을 사용하려고 할 때마다 (예를 들어)$(..).datepicker()는 함수가 아닙니다.

제 vendor.ts 파일에 Jquery가 포함되어 있기 때문에 단순히 다음을 사용하여 제 구성 요소로 가져왔습니다.

import * as $ from 'jquery';

이제 Jquery 플러그인을 사용할 수 있습니다(예: 부트스트랩-데이트 타임 피커).

또한 "Injection"을 사용하여 가져오기를 시도할 수 있습니다.토큰". 여기에 설명된 대로:유형 정의 없이 Angular/Types 스크립트에서 jQuery

jQuery 글로벌 인스턴스를 주입하고 사용하기만 하면 됩니다.이를 위해 유형 정의나 입력이 필요하지 않습니다.

import { InjectionToken } from '@angular/core';

export const JQ_TOKEN = new InjectionToken('jQuery');

export function jQueryFactory() {
    return window['jQuery'];
}

export const JQUERY_PROVIDER = [
    { provide: JQ_TOKEN, useFactory: jQueryFactory },
];

app.module.ts에서 올바르게 설정된 경우:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';

import { JQ_TOKEN } from './jQuery.service';

declare let jQuery: Object;

@NgModule({
    imports: [
        BrowserModule
    ],
    declarations: [
        AppComponent
    ],
    providers: [
        { provide: JQ_TOKEN, useValue: jQuery }
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

구성 요소에서 사용을 시작할 수 있습니다.

import { Component, Inject } from '@angular/core';
import { JQ_TOKEN } from './jQuery.service';

@Component({
    selector: "selector",
    templateUrl: 'somefile.html'
})
export class SomeComponent {
    constructor( @Inject(JQ_TOKEN) private $: any) { }

    somefunction() {
        this.$('...').doSomething();
    }
}

아래 src/Main.ts에 이 코드를 추가하면 모든 프로젝트에서 중요한 jquery와 모든 기능이 제공됩니다.

import * as jquery from 'jquery';
import * as bootstrap from 'bootstrap';

npm i @types/jquerynpm i @types/bootstrap을 잊지 마십시오.

jquery 설치

터미널 $npm install jquery

(부트스트랩 4의 경우...)

터미널 $npm install popper.js

터미널 $npm install bootstrap

다음을 추가합니다.import에 대한 진술.app.module.ts.

import 'jquery'

(부트스트랩 4의 경우...)

import 'popper.js'
import 'bootstrap'

이제 당신은 더 이상 필요하지 않을 것입니다.<SCRIPT>JavaScript를 참조하는 태그입니다.

(사용할 CSS는 여전히 에서 참조되어야 합니다.styles.css)

@import "~bootstrap/dist/css/bootstrap.min.css";

언급URL : https://stackoverflow.com/questions/30623825/how-to-use-jquery-with-angular

반응형