[英]How to integrate a library written in riot.js into angular app
Can I get any example of library written in riot.js is being used in angular app?我能得到 angular 应用程序中使用的用 riot.js 编写的库的任何示例吗?
You can use this ready made angular module https://github.com/lucasbrigida/angular-riot and then do the following:您可以使用这个现成的 angular 模块https://github.com/lucasbrigida/angular-riot然后执行以下操作:
angular.module('moduleName', ['angular-riot'])
.controller('ctrlName', ['$scope', $document, 'riot', function ($scope, $document, riot) {
$document.ready(function () {
riot.mount('todo', {
title: 'I want to behave!',
items: [
{ title: 'Avoid excessive coffeine', done: true },
{ title: 'Hidden item', hidden: true },
{ title: 'Be less provocative' },
{ title: 'Be nice to people' }
]
});
});
}]);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.