AngularJS 교차 도메인 포함
AngularJS 교차 도메인 포함
기본적으로 ng-include 지정 문에서는 다른 도메인의 파일을 포함 할 수 없습니다.
다른 도메인의 파일을 포함 시키려면 응용 프로그램의 구성 기능에 법적 파일 및 / 또는 도메인의 화이트리스트를 추가하십시오.
예:
<body ng-app="myApp">
<div ng-include="'https://tryit.w3schools.com/angular_include.php'"></div>
<script>
var app = angular.module('myApp', [])
app.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'https://tryit.w3schools.com/**'
]);
});
</script>
</body>
[전체소스]
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body ng-app="myApp">
<div ng-include="'https://tryit.w3schools.com/angular_include.php'"></div>
<script>
var app = angular.module('myApp', [])
app.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'https://tryit.w3schools.com/**'
]);
});
</script>
</body>
</html>
기본적으로 ng-include 지정 문에서는 다른 도메인의 파일을 포함 할 수 없습니다.
다른 도메인의 파일을 포함 시키려면 응용 프로그램의 구성 기능에 법적 파일 및 / 또는 도메인의 화이트리스트를 추가하십시오.
예:
<body ng-app="myApp">
<div ng-include="'https://tryit.w3schools.com/angular_include.php'"></div>
<script>
var app = angular.module('myApp', [])
app.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'https://tryit.w3schools.com/**'
]);
});
</script>
</body>
[전체소스]
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body ng-app="myApp">
<div ng-include="'https://tryit.w3schools.com/angular_include.php'"></div>
<script>
var app = angular.module('myApp', [])
app.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'https://tryit.w3schools.com/**'
]);
});
</script>
</body>
</html>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 298 | CSS |
선택과집중
|
1개월 전 | 148 | |
| 297 | CSS |
선택과집중
|
3개월 전 | 351 | |
| 296 | CSS |
선택과집중
|
3개월 전 | 302 | |
| 295 | CSS |
선택과집중
|
3개월 전 | 282 | |
| 294 | CSS |
선택과집중
|
4개월 전 | 408 | |
| 293 | CSS |
선택과집중
|
4개월 전 | 353 | |
| 292 | CSS |
선택과집중
|
4개월 전 | 272 | |
| 291 | CSS |
선택과집중
|
4개월 전 | 282 | |
| 290 | CSS |
선택과집중
|
4개월 전 | 325 | |
| 289 | CSS |
선택과집중
|
4개월 전 | 300 | |
| 288 | CSS |
선택과집중
|
4개월 전 | 386 | |
| 287 | CSS |
선택과집중
|
5개월 전 | 338 | |
| 286 | CSS |
선택과집중
|
5개월 전 | 335 | |
| 285 | CSS |
선택과집중
|
5개월 전 | 355 | |
| 284 | CSS |
선택과집중
|
5개월 전 | 241 | |
| 283 | CSS |
|
2년 전 | 1514 | |
| 282 | CSS | 2년 전 | 2490 | ||
| 281 | CSS | 4년 전 | 4019 | ||
| 280 | CSS | 4년 전 | 4544 | ||
| 279 | 반응형웹 | 5년 전 | 2977 | ||
| 278 | 반응형웹 | 5년 전 | 2822 | ||
| 277 | 부트스트랩 | 7년 전 | 5020 | ||
| 276 | 부트스트랩 | 7년 전 | 6574 | ||
| 275 | 부트스트랩 | 7년 전 | 4657 | ||
| 274 | 부트스트랩 | 7년 전 | 6687 | ||
| 273 | 부트스트랩 | 7년 전 | 3356 | ||
| 272 | 부트스트랩 | 7년 전 | 3196 | ||
| 271 | 부트스트랩 | 7년 전 | 3697 | ||
| 270 | 부트스트랩 | 7년 전 | 3217 | ||
| 269 | 부트스트랩 | 7년 전 | 3091 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기