3. Learn backbone.js tutorial from scratch for beginners(Part 5) Underscore Templates in Backbone.js
C:\Users\Administrator\Desktop\gulp\index.html
<!DOCTYPE html>
<html>
<head>
<title>Backbone Example</title>
<link rel="stylesheet" href="lib\css\todos.css" />
<script src="lib/js/jquery-1.9.1.js"></script>
<script src="lib/js/underscore.js"></script>
<script src="lib/js/backbone.js"></script>
<script src="app.js"></script>
<script type="text/template" id="ourTemplate">
<h1>Hello 1</h1>
<h2>Hello 2</h2>
<p>Lorem ipsum dolor sit amet, consectetur adip</p>
</script>
</head>
<body>
<div id="div1"></div>
</body>
</html>
C:\Users\Administrator\Desktop\gulp\app.js
Hoặc viết theo một cách logic hơn
C:\Users\Administrator\Desktop\gulp\app.js
Previous2. Learn backbone.js tutorial from scratch for beginners(Part 4) About el and $el in Backbone.jsNext4. Learn backbone.js tutorial from scratch for beginners (Part 7) Delegate Events in backbone.js
Last updated
Was this helpful?