Last active
July 31, 2018 02:36
-
-
Save conanak99/04906150663e5602b7964c9b3f5bb1e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Tài liệu học tập</title> | |
</head> | |
<body ng-app="javApp" ng-controller="javController"> | |
<ul> | |
<!-- Template trong view --> | |
<li ng-repeat="video in learningVideos"> | |
<a href="{{video.link}}">{{video.name}}</a> | |
</li> | |
</ul> | |
</body> | |
<!-- Thư viện AngularJS trước tiên --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.2/angular.min.js"></script> | |
<!-- Một số thư viện đi kèm --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/1.0.18/angular-ui-router.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-thiendia/1.0.0/angular-thiendia.min.js"></script> | |
<!-- Code JavaScript viết thêm, thường sẽ nằm ở file riêng --> | |
<script> | |
var app = angular.module('javApp', []); | |
// Controller móc nối dữ liệu | |
app.controller('javController', ['$scope', function($scope) { | |
$scope.learningVideos = [ | |
{ name: 'Tài liệu Việt', link: 'http://vav.av' }, | |
{ name: 'Tài liệu Hàn', link: 'http://kav.av' }, | |
{ name: 'Tài liệu Nhật', link: 'http://jav.av' } | |
]; | |
}]); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment