하이브리드 처리 부분에서 일부 통신을 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;
이해를 돕기위해 길게 작성 한겁니다 ㅎㅎㅎ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6930 |
SOFTA
|
11년 전 | 5984 | |
| 6929 |
|
11년 전 | 1596 | |
| 6928 | 11년 전 | 1756 | ||
| 6927 | 11년 전 | 1779 | ||
| 6926 | 11년 전 | 1884 | ||
| 6925 | 11년 전 | 2276 | ||
| 6924 | 11년 전 | 3874 | ||
| 6923 | 11년 전 | 2273 | ||
| 6922 |
level999
|
11년 전 | 1041 | |
| 6921 | 11년 전 | 822 | ||
| 6920 | 11년 전 | 956 | ||
| 6919 | 11년 전 | 1072 | ||
| 6918 | 11년 전 | 1311 | ||
| 6917 | 11년 전 | 15428 | ||
| 6916 | 11년 전 | 1426 | ||
| 6915 | 11년 전 | 588 | ||
| 6914 | 11년 전 | 616 | ||
| 6913 | 11년 전 | 880 | ||
| 6912 | 11년 전 | 3126 | ||
| 6911 |
사랑해요79
|
11년 전 | 967 | |
| 6910 | 11년 전 | 745 | ||
| 6909 | 11년 전 | 781 | ||
| 6908 | 11년 전 | 644 | ||
| 6907 | 11년 전 | 832 | ||
| 6906 | 11년 전 | 1588 | ||
| 6905 | 11년 전 | 569 | ||
| 6904 | 11년 전 | 1010 | ||
| 6903 | 11년 전 | 1676 | ||
| 6902 |
2donggalbi
|
11년 전 | 516 | |
| 6901 | 11년 전 | 1395 | ||
| 6900 | 11년 전 | 722 | ||
| 6899 | 11년 전 | 861 | ||
| 6898 |
열라뽕똬이
|
11년 전 | 1317 | |
| 6897 |
this1mg
|
11년 전 | 1614 | |
| 6896 |
sbdossb
|
11년 전 | 580 | |
| 6895 |
봉보로봉봉
|
11년 전 | 1154 | |
| 6894 |
똘똘이스머츠
|
11년 전 | 497 | |
| 6893 |
네이비컬러
|
11년 전 | 3639 | |
| 6892 | 11년 전 | 1077 | ||
| 6891 |
네이비컬러
|
11년 전 | 1319 | |
| 6890 | 11년 전 | 1141 | ||
| 6889 | 11년 전 | 589 | ||
| 6888 | 11년 전 | 726 | ||
| 6887 | 11년 전 | 615 | ||
| 6886 | 11년 전 | 5058 | ||
| 6885 | 11년 전 | 557 | ||
| 6884 |
asfasdfd235
|
11년 전 | 584 | |
| 6883 | 11년 전 | 3039 | ||
| 6882 | 11년 전 | 938 | ||
| 6881 | 11년 전 | 4430 | ||
| 6880 | 11년 전 | 1818 | ||
| 6879 |
퍼블리셔지노군
|
11년 전 | 2628 | |
| 6878 | 11년 전 | 559 | ||
| 6877 | 11년 전 | 583 | ||
| 6876 | 11년 전 | 1445 | ||
| 6875 | 11년 전 | 630 | ||
| 6874 | 11년 전 | 1603 | ||
| 6873 | 11년 전 | 1606 | ||
| 6872 | 11년 전 | 4461 | ||
| 6871 |
Abilityarch
|
11년 전 | 966 | |
| 6870 | 11년 전 | 2128 | ||
| 6869 | 11년 전 | 1410 | ||
| 6868 | 11년 전 | 1454 | ||
| 6867 | 11년 전 | 1527 | ||
| 6866 | 11년 전 | 744 | ||
| 6865 | 11년 전 | 1617 | ||
| 6864 | 11년 전 | 476 | ||
| 6863 | 11년 전 | 3751 | ||
| 6862 | 11년 전 | 1849 | ||
| 6861 | 11년 전 | 1647 | ||
| 6860 | 11년 전 | 1310 | ||
| 6859 |
cityman
|
11년 전 | 6815 | |
| 6858 | 11년 전 | 1271 | ||
| 6857 |
의정부아줌마
|
11년 전 | 873 | |
| 6856 | 11년 전 | 2375 | ||
| 6855 | 11년 전 | 1701 | ||
| 6854 | 11년 전 | 829 | ||
| 6853 | 11년 전 | 1210 | ||
| 6852 | 11년 전 | 2599 | ||
| 6851 | 11년 전 | 1976 | ||
| 6850 | 11년 전 | 1797 | ||
| 6849 | 11년 전 | 2085 | ||
| 6848 | 11년 전 | 2367 | ||
| 6847 | 11년 전 | 3146 | ||
| 6846 | 11년 전 | 2722 | ||
| 6845 | 11년 전 | 2801 | ||
| 6844 | 11년 전 | 3525 | ||
| 6843 | 11년 전 | 3267 | ||
| 6842 |
아트291
|
11년 전 | 695 | |
| 6841 | 11년 전 | 4172 | ||
| 6840 | 11년 전 | 5187 | ||
| 6839 | 11년 전 | 894 | ||
| 6838 |
|
11년 전 | 2097 | |
| 6837 | 11년 전 | 1278 | ||
| 6836 |
netdf
|
11년 전 | 615 | |
| 6835 |
|
11년 전 | 1011 | |
| 6834 | 11년 전 | 674 | ||
| 6833 |
|
11년 전 | 2687 | |
| 6832 |
울산굿모닝
|
11년 전 | 1663 | |
| 6831 |
|
11년 전 | 674 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기