Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require.config({
- baseUrl: "/js/",
- paths: {
- "ko": "lib/ko",
- "utils": "utils",
- "io": "lib/socket.io"
- },
- "packages": [{
- "name": "jade-runtime",
- "location": "utils",
- "main": "jade.runtime.js"
- }]
- });
- require(["jquery", "ko/ko", "io/socket.io"], function($, ko, io) {
- $(function() {
- var socket = io.connect();
- socket.on('connect', function() {
- });
- require(["/templates/ui/comment.js"], function(comments) {
- $('.comment-list').append(
- comments({
- item: 'привет'
- }));
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement