lab.naminsik
  • Javascript, jQuery
  • Reactjs
  • React Native
  • iOS
  • Android
  • AWS
  • Server
  • Html, CSS
  • Php
  • asp .net
  • SQL
  • Word Press
search
keywords
  • Angularjs 2016‧09‧08

    스코프 데이터 html로 바인딩하기

    예를 들어 $scope.text1 = '<h3>제목</h3>';라고 있고 dom에서 {{text1}} 하면 바로 <h3>제목</h3>가 노출된다.이를 html로 적용시키려면 아래와 같이 만들어야한다. 방법 1. 헤더에서 angular-sanitize 를 불러와준다.  <script src="/angular-1.5.8/angular-sanitize.min.js"></script>  모듈에 ngSaitize를 넣어준다. var app = angular.module('모듈이름',['ngRoute','ngAnimate','ngSanitize'], function($httpProvider){ });  이제 준비가 되었다. dom에는 아래와 같이 넣어준다. <p ng-bind-html="text1"></p> 그럼 제대로 데이터가 html로 바인딩 된 것을 확인할 수 있다. 방법 2. […]

  • Angularjs 2016‧01‧19

    동적으로 외부파일 불러와서 dom에 바인딩($http, ng-view, ng-include 3가지 활용)

    html 중에 메뉴를 아래와 같이 만들었다 가정합니다. index.html <div class="btnClick" ng-controller='gnbNav' > <nav id="lnb"> <ul> <li ng-repeat='gnbMenu in gnbMenus' > <button ng-click="callProject()"> <div class="listNumber">{{gnbMenu.Num}}</div> <h2>{{gnbMenu.title}}</h2> <span>{{gnbMenu.date}}</span> </button> </li> </ul> </nav> </div> 그리고 메뉴 구조를 아래처럼 변수에 담아두겠습니다. app.js var gnbLoad = [ {Num : "2", title : "테스트2", date : "2015.8.1", url : "test2.html"}, {Num […]

  • Angularjs 2015‧02‧12

    Angularjs - 외부 json 파일 불러와서 dom에 바인딩 시키기

    코드 출처 : http://codepen.io/tutorialab/pen/EJAet?editors=101 <div id="wrapper" ng-app> <div ng-controller="DataCtrl"> <pre ng-model="data"> {{data}} </pre> <input ng-model='name' /> {{name}} <input ng-model='salutation' /> {{salutation}} <input ng-model='greeting' /> {{greeting}} </div> </div>  위 처럼 html 을 만든다. angular.module('', []); function DataCtrl($scope, $http) { $http.jsonp("http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero"). success(function(data) { $scope.data = data; $scope.name = data.name; $scope.salutation = data.salutation; $scope.greeting = data.greeting; }). error(function (data) […]

  • Angularjs 2015‧02‧12

    Angularjs - jsonp 불러오기

    외부에 있는 json 파일을 불러오는 코드이다. 출처 : http://jsfiddle.net/zkfruxu3/ <div ng-app ng-controller="jsonp_example"> <button ng-click="doRequest()">Make JSONP request</button> </div>  위 처럼 html 안에 버튼을 클릭하면 doRequest 함수가 실행되게 만든다. function jsonp_example($scope, $http) { $scope.doRequest = function() { var url = "http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=JSON_CALLBACK"; $http.jsonp(url) .success(function(data){ console.log(data.found); }); }; var url = "http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=JSON_CALLBACK"; $http.jsonp(url) .success(function(data){ console.log(data.found); }); }  외부 파일을 $http.jsonp을 통해 […]

  • Javascript, jQuery 2015‧01‧26

    jQuery - Ajax로 데이터 불러오기

    외부 데이터를 불러올 때 Ajax를 통해서 가져오는 경우가 많다. Ajax를 통해서 Json 형식의 파일을 불러오는 예제를 만들면 아래와 같다. $.ajax({ type: "GET", url: "파일경로및 파일명", dataType: "json", cache: false, success: function(data){ $.each(data.dataList,function(index){ $('li').eq(index).html(data.dataList[index].val); }); },error: function(XMLHttpRequest, textStatus, errorThrown) { console.log("Status: " + textStatus); },timeout: 3000 });  설명하자면 timeout 에 3000을 입력해둔 것은 외부 데이터를 불러오는 […]

popular

  • CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server.
  • js - 채널톡 삽입(커스텀 버튼, 뱃지 카운트, 서포트봇 양식 연동)
  • react, vue - Uncaught SyntaxError: Unexpected token
  • Moss & Dew studio web site
  • KGC Sports site renewal
  • Samsung Thunders site renewal
  • 체크박스 라벨을 이미지 만들었고 클릭해도 반응 없을 때
  • css - 모바일웹 화면 회전시 텍스트 크기가 변경될 때
  • 안드로이드 스튜디오에 모듈,라이브러리 추가하기
  • MOBIS Carfe Intro Movie

comment

  • 감사합니다!
  • 감사합니다~
  • 잘 해결 되셨다니 다행입니다!...
  • 정말 감사합니다. 덕분에 해결했습니다!...
  • 유용한정보 대단히 감사합니다....