dpw50696 2016-10-08 11:01
浏览 51

使用Angularjs的Codeigniter中的文件夹结构应该是什么

I have just started to work on an app in Codeigniter with AngularJS. I want to use font-awesome offline but can't make it to work. I suspect the file folder structure of my application which is:

CI-AJS-APP
 -app
 -application
 -assets
  -css
  -font-awesome
   -font-awesome.css
   -font
  -js
 -system
 ...

Now in my font-awesome.css file I have a reference to the fonts folder as:

@font-face {

    font-family: "FontAwesome";
    src: url('font/fontawesome-webfont.eot');
    src: url('font/fontawesome-webfont.eot?#iefix') format('eot'),
    url('font/fontawesome-webfont.woff') format('woff'),
    url('font/fontawesome-webfont.ttf') format('truetype'),
    url('font/fontawesome-webfont.svg#FontAwesome')
    format('svg');
    font-weight: normal;
    font-style: normal;

          }

In my application header I have included the font-awesome.css file as:

<link rel="stylesheet" href="<?php echo base_url();?>assets/
font-awesome/font-awesome.css">

I have not fully integrated AngularJS in CI however just for a page or two on which I want to show the font-awesome icons.

Any kind of help will be much appreciated.

  • 写回答

1条回答 默认 最新

  • doumi9618 2016-10-08 16:33
    关注

    Well I have found that file structure is alright. The reason for the problem was that I was using ng-class the wrong way.

    This is what I was doing...

    ng-class="{{fa fa-sort-asc}}"
    

    But I found that the correct way to achieve this is...

    ng-class="{{'fa fa-sort-asc'}}"
    

    Notice the missing single quotes with the classname in the former code.

    So, this mistake was not displaying the font-awesome icon at all in the browser.

    Hope will be helpful to some out there :-).

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度