study AngularJS and write demo follow the official document.