하이브리드 처리 부분에서 일부 통신을 PHP 웹뷰로 띄우는 부분이 있는데 앵귤러로 처리 하니 편하네요 ㅎㅎㅎ
[code]
<script type="text/javascript">
function address_book($scope, $http) {
// 주소록 데이터
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㄱ').success(function(response) {$scope.data1 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㄴ').success(function(response) {$scope.data2 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㄷ').success(function(response) {$scope.data3 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㄹ').success(function(response) {$scope.data4 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅁ').success(function(response) {$scope.data5 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅂ').success(function(response) {$scope.data6 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅅ').success(function(response) {$scope.data7 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅇ').success(function(response) {$scope.data8 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅈ').success(function(response) {$scope.data9 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅊ').success(function(response) {$scope.data10 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅋ').success(function(response) {$scope.data11 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅌ').success(function(response) {$scope.data12 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅍ').success(function(response) {$scope.data13 = response;});
$http.get('<?php echo APP_DATA_URL; ?>/data/user_data.php?linear=ㅎ').success(function(response) {$scope.data14 = response;});
var match = function (item, val) {
var regex = new RegExp(val, 'i');
return item.name_linear.toString().search(regex) == 0 ||
item.name.toString().search(regex) == 0 ||
item.tel_1_origin.toString().search(regex) == 0 ||
item.tel_1.toString().search(regex) == 0 ||
item.tel_4cut.toString().search(regex) == 0;
};
// 검색 설정
$scope.filterData = function(item) {
if(!$scope.searchField) return true;
var matched = true;
// Otherwise apply your matching logic
$scope.searchField.split(' ').forEach(function(token) {
matched = matched && match(item, token);
});
return matched;
}
}
</script>
<!-- 본문검색 { -->
<section id="topmenu">
<div class="header">
<p class="srchBox">
<span class="btn s"></span>
<input type="text" ng-model="searchField" class="txt" placeholder="이름, 전화번호를 입력해주세요.">
<a href="<?php echo APP_URL; ?>/member_form" class="btn new">신규고객</a>
</p>
</div>
</section>
<!-- } 본문검색 -->
<!-- 탭메뉴 { -->
<div class="calltab">
<ul>
<li class="off"><a href="#"><span>통화이력</span></a></li>
<li class="on"><a href="#"><span>고객목록</span></a></li>
</ul>
</div>
<!-- } 탭메뉴 -->
<!-- 리스트 { -->
<div class="memlist" ng-controller="address_book">
<h2 ng-if="data1">ㄱ</h2>
<ul ng-repeat="x in data1 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data2">ㄴ</h2>
<ul ng-repeat="x in data2 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data3">ㄷ</h2>
<ul ng-repeat="x in data3 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data4">ㄹ</h2>
<ul ng-repeat="x in data4 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data5">ㅁ</h2>
<ul ng-repeat="x in data5 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data6">ㅂ</h2>
<ul ng-repeat="x in data6 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data7">ㅅ</h2>
<ul ng-repeat="x in data7 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data8">ㅇ</h2>
<ul ng-repeat="x in data8 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data9">ㅈ</h2>
<ul ng-repeat="x in data9 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data10">ㅊ</h2>
<ul ng-repeat="x in data10 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data11">ㅋ</h2>
<ul ng-repeat="x in data11 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data12">ㅌ</h2>
<ul ng-repeat="x in data12 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data13">ㅍ</h2>
<ul ng-repeat="x in data13 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
<h2 ng-if="data14">ㅎ</h2>
<ul ng-repeat="x in data14 | filter:filterData">
<li>
<span ng-hide="true">{{x.name_linear}}</span>
<span ng-hide="true">{{x.tel_4cut}}</span>
<a href="tel:{{x.tel_1_origin}}" class="tel">
<p class="name">{{x.name}} {{x.tel_1}}</p>
<p class="age">{{x.sex}} / {{x.age}}세</p>
</a>
<a href="<?php echo APP_URL; ?>/member_form?idx={{x.idx}}" class="go ic">고객정보</a>
</li>
</ul>
</div>
<!-- } 리스트 -->
[/code]
댓글 6개
뭐? 이리 습득력이 빨라요......^-^
얼렁 쫏아가야 되는데 ...헉헉 되겠당.....ㅋㅋㅋㅋ
아직 많이 몰라요.
본격적으로 사용 한지가1주일 밖에 안되서
더 가볍네요.
좋은 정보 감사합니다.
다음앱에 적용 해봐야겠네요 ㅎㅎ
배열에 for($i=0;$i < sizeof($initial);$i++)문 돌리는게 더... T_T;
이해를 돕기위해 길게 작성 한겁니다 ㅎㅎㅎ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6830 |
112211dd
|
11년 전 | 792 | |
| 6829 |
진짜다진짜가나타남
|
11년 전 | 1207 | |
| 6828 | 11년 전 | 822 | ||
| 6827 |
봉보로봉봉
|
11년 전 | 913 | |
| 6826 |
jinion
|
11년 전 | 823 | |
| 6825 | 11년 전 | 804 | ||
| 6824 |
yunkiri486
|
11년 전 | 724 | |
| 6823 |
2donggalbi
|
11년 전 | 852 | |
| 6822 | 11년 전 | 850 | ||
| 6821 | 11년 전 | 803 | ||
| 6820 | 11년 전 | 3106 | ||
| 6819 | 11년 전 | 1250 | ||
| 6818 | 11년 전 | 518 | ||
| 6817 |
|
11년 전 | 610 | |
| 6816 | 11년 전 | 2080 | ||
| 6815 | 11년 전 | 1215 | ||
| 6814 | 11년 전 | 866 | ||
| 6813 | 11년 전 | 607 | ||
| 6812 |
|
11년 전 | 985 | |
| 6811 | 11년 전 | 584 | ||
| 6810 | 11년 전 | 1536 | ||
| 6809 |
낚시가좋아
|
11년 전 | 1047 | |
| 6808 | 11년 전 | 440 | ||
| 6807 | 11년 전 | 764 | ||
| 6806 |
Unhappy
|
11년 전 | 1775 | |
| 6805 | 11년 전 | 1606 | ||
| 6804 | 11년 전 | 1125 | ||
| 6803 | 11년 전 | 565 | ||
| 6802 |
asdfg
|
11년 전 | 1135 | |
| 6801 |
아트귀농인
|
11년 전 | 503 | |
| 6800 | 11년 전 | 2556 | ||
| 6799 | 11년 전 | 1357 | ||
| 6798 | 11년 전 | 1466 | ||
| 6797 | 11년 전 | 627 | ||
| 6796 |
purple63
|
11년 전 | 431 | |
| 6795 | 11년 전 | 2638 | ||
| 6794 |
커네드커네드
|
11년 전 | 963 | |
| 6793 | 11년 전 | 409 | ||
| 6792 | 11년 전 | 2500 | ||
| 6791 | 11년 전 | 527 | ||
| 6790 | 11년 전 | 2259 | ||
| 6789 |
리아빌리티
|
11년 전 | 3098 | |
| 6788 | 11년 전 | 1345 | ||
| 6787 | 11년 전 | 680 | ||
| 6786 | 11년 전 | 392 | ||
| 6785 | 11년 전 | 721 | ||
| 6784 |
|
11년 전 | 848 | |
| 6783 | 11년 전 | 585 | ||
| 6782 | 11년 전 | 3657 | ||
| 6781 |
리아빌리티
|
11년 전 | 487 | |
| 6780 | 11년 전 | 532 | ||
| 6779 | 11년 전 | 484 | ||
| 6778 | 11년 전 | 4693 | ||
| 6777 |
바보온달123
|
11년 전 | 618 | |
| 6776 | 11년 전 | 931 | ||
| 6775 | 11년 전 | 731 | ||
| 6774 |
DANet
|
11년 전 | 641 | |
| 6773 | 11년 전 | 1558 | ||
| 6772 | 11년 전 | 1356 | ||
| 6771 | 11년 전 | 619 | ||
| 6770 | 11년 전 | 1160 | ||
| 6769 | 11년 전 | 955 | ||
| 6768 | 11년 전 | 690 | ||
| 6767 | 11년 전 | 584 | ||
| 6766 | 11년 전 | 1264 | ||
| 6765 |
크림나이트
|
11년 전 | 999 | |
| 6764 | 11년 전 | 1549 | ||
| 6763 | 11년 전 | 2601 | ||
| 6762 | 11년 전 | 536 | ||
| 6761 |
|
11년 전 | 783 | |
| 6760 |
|
11년 전 | 712 | |
| 6759 | 11년 전 | 3352 | ||
| 6758 | 11년 전 | 1007 | ||
| 6757 | 11년 전 | 1269 | ||
| 6756 | 11년 전 | 892 | ||
| 6755 |
|
11년 전 | 568 | |
| 6754 |
|
11년 전 | 714 | |
| 6753 |
|
11년 전 | 1386 | |
| 6752 | 11년 전 | 608 | ||
| 6751 |
|
11년 전 | 653 | |
| 6750 |
|
11년 전 | 2020 | |
| 6749 | 11년 전 | 1216 | ||
| 6748 |
|
11년 전 | 1118 | |
| 6747 | 11년 전 | 1170 | ||
| 6746 | 11년 전 | 840 | ||
| 6745 |
|
11년 전 | 911 | |
| 6744 | 11년 전 | 851 | ||
| 6743 | 11년 전 | 1291 | ||
| 6742 | 11년 전 | 541 | ||
| 6741 |
Abilityarch
|
11년 전 | 611 | |
| 6740 | 11년 전 | 655 | ||
| 6739 |
leewin20
|
11년 전 | 1234 | |
| 6738 | 11년 전 | 507 | ||
| 6737 | 11년 전 | 1219 | ||
| 6736 | 11년 전 | 1258 | ||
| 6735 | 11년 전 | 547 | ||
| 6734 | 11년 전 | 1284 | ||
| 6733 |
RipperTNT
|
11년 전 | 1839 | |
| 6732 |
|
11년 전 | 1337 | |
| 6731 |
|
11년 전 | 1395 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기