我正在玩聚合物。
目标
我想使用封装在此自定义元素中的带有引导模式对话框的polymerjs创建自定义元素。干净的解决方案似乎是使用mike costello 的 bootstrap-web-components
boostrap-modal.html
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/bootstrap-web-components/dist/imports.html">
<polymer-element name="bootstrap-modal" attributes="script css">
<template>
<bs-modal title="Title" show="false">
Dialog Contents
</bs-modal>
</template>
<script>
</script>
</polymer-element>
问题
我用凉亭安装库。我的项目有根 Polymer 并且在这个文件夹中驻留index.html文件、bower.json文件和一个文件夹bower_components。我的bootstrap和bootstrap-web-components文件夹位于 bower_components 文件夹中。我只在我的自定义元素中导入 bootstrap-web-components imports.html 文件。
运行时,我得到一个Uncaught TypeError: undefined is not a function on the 13th line of bootstrap-web-components.js
感谢您的帮助!