JSFiddle - React, Tailwind, and code Playground
by Jay Lim
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css">
<body ng-app="app">
<div ng-controller="DemoCtrl as ctrl">
<label>예제 텍스트</label>
<input class="u-full-width" type="text" ng-model="ctrl.model">
<ul id="targetUl"></ul>
</div>
</body>
JavaScript
(function(){
angular.module('app', [])
.controller('DemoCtrl', function($scope){
var ctrl = this;
ctrl.model = '김경민은 사육당하고 있다.';
$scope.$watch('ctrl.model', function(newValue, oldValue){
var newElem = newValue;
var oldElem = oldValue; // 이 예제에서는 사용하지 않는다.
angular.element(document.getElementById('targetUl')).append('<li>'+newElem+'</li>');
});
});
}());