我的 Foundation6 有一半在 Angular4 中不起作用

Half of my Foundation6 doesn't work in Angular4

有某些 Foundation 6 元素适用于我的 Angular 应用程序,例如 .button class 但是当我尝试制作下拉菜单或导航栏时它没有t 折叠下拉菜单

<ul class="dropdown menu" data-dropdown-menu>
  <li>
    <a href="#">Item 1</a>
    <ul class="menu">
      <li><a href="#">Item 1A</a></li>
      <li><a href="#">Item 1B</a></li>
    </ul>
  </li>
  <li><a href="#">Item 2</a></li>
  <li><a href="#">Item 3</a></li>
  <li><a href="#">Item 4</a></li>
</ul>

不过看起来像

--

--

我的 .angular-cli.json 文件中有以下几行

  "styles": [
    "../node_modules/foundation-sites/dist/css/foundation-flex.css",
    "styles.scss"
  ],
  "scripts": [
    "../node_modules/foundation-sites/vendor/jquery/dist/jquery.js",
    "../node_modules/foundation-sites/dist/js/foundation.js"
  ],

我的预感是 javascript 方面不工作,但我不确定如何修复它。

** 我进入 NPM 文件夹以确保 .angular-cli.json 指向的那些文件确实存在。

在不同的聊天频道询问后,这就是我学到的东西

you really should have a wrapper for foundation, im not sure there is one, there is one for bootstrap and theres one for material2. I would start there and look at those components. Foundation doesn't offer any benefits to Angular when it comes to components because they weren't written specifically for angular. You can still pick and choose that pieces you like from the SCSS/ CSS of foundation but you would have to write your own components or use bootstraps and just them it to be like foundation ie: https://material.angular.io/components or https://ng-bootstrap.github.io/#/home

  • @zurie 在 Gitter 上

所以现在我决定研究 material 直到我了解更多。