Angular2,组件未加载外部css

时间:2016-03-25 13:43:33

标签: typescript angular

我正在尝试将外部css文件加载到我的应用中。出于某种原因,指定的html正在加载,但css不是,我无法弄清楚我做错了什么。

我也无法在服务器日志中看到对css文件的GET请求,仅针对html。

这是我的组成部分:

import { Component } from 'angular2/core';

@Component({
    selector: 'portfolio',
    templateUrl: '/app/views/landing.html',
    styleUrls : ['/app/styles/landingMobile.css', '/app/styles/landingOther.css']
})

export class LandingComponent { }

我的文件结构如下:

app
--styles
----landingMobile.css
----landingOther.css
----template.css
--views
----landing.html
----template.html
--app.component.ts
--landing.component.ts
--main.ts
--portfolio.component.ts
node_modules
typings
index.html

感谢您的帮助。

0 个答案:

没有答案
相关问题