2013-02-12 71 views
0

加載Web組件當試圖插入一個WebComponent的HTML文件到views目錄在我的應用程序庫中,web_ui編譯器會引發這是可以預期的消息從lib子目錄

FileIOException: Cannot retrieve full path for file 'lib\src\view\entity\base\packages' (OS Error: The system cannot find the file specified. 

?如果不是,我該怎麼做才能解決這個錯誤?

回答

1

由於我沒有看到您的代碼或項目,這只是一個預感。我相信你的Web組件HTML文件以錯誤的方式導入一些組件。

嘗試遵循這種結構:

/lib/src/view/foo/foo.html 
/lib/src/view/foo/foo.dart 

/lib/src/view/bar/bar.html 
/lib/src/view/bar/bar.dart 

而且裏面foo.html:我不是在foo.html使用packages

<!DOCTYPE html> 
<html> 
    <head> 
    <link rel="components" href="../bar/bar.html" /> 
    </head> 
<body> 
    <element name="x-foo" constructor="FooComponent" extends="div"> 
    <template> 
     ... 
    </template> 
    <script type="application/dart" src="foo.dart"></script> 
    </element> 
</body> 
</html> 

注意。