dqdpz60048 2015-10-21 14:14
浏览 51
已采纳

Symfony DataTables [Js]作曲家

I am starting to be comfortable with Symfony and the MVC model. But, I would like to know which is the best way to install and Datables with symfony.

First of all, I try to avoid downloading manualy Js plugins and put all of them in my Src/Bundle/Ressources/Js/. I want to download them with composer.

For instance, I went to Packagist.org and download this : https://packagist.org/packages/datatables/datatables. By exécuting the command : composer require datatables/datatables.

The problem is composer placed this package in the vendor folder.

I want to know which the cleanest and the best way to include the js in my twig page.

Can anyone manianc like me (actualy anyone) can help me with solution, a walkthough.... ? :P

Thanks a lot in advance Good day

  • 写回答

1条回答 默认 最新

  • dongxie3701 2015-10-21 21:21
    关注

    I think I found the answer even before this posts... but I was blocked by a syntax error... There is simple example here in the symfony documentation.

    app/config/config.yml

    assetic: assets: jquery_and_ui: inputs: - '@AppBundle/Resources/public/js/thirdparty/jquery.js' - '@AppBundle/Resources/public/js/thirdparty/jquery.ui.js'

    The problems in the recent verision you have to put the full name of the bundle. Like "JoeAppBundle". Do you think it's normal ?

    Good day

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应