0

I'm working on a hybrid mobile app using famo.us-angular. I'm trying to include a partial/template in my 'index.html' like so:

<fa-surface class="content">
    <div ng-include src="'test.html'"></div>
</fa-surface>

Double quotes are there, there's no 404 for the file and my 'test.html' contains only this:

<p>test</p>

After hours of googling and looking here I believe this should work but I get the following error from console.

TypeError: Cannot read property 'then' of undefined
    at angular.min.js:217
    at angular.min.js:51
    at $get.h (angular.min.js:52)
    at l (angular.min.js:56)
    at angular.min.js:217
    at angular.min.js:112
    at l.$get.l.$eval (angular.min.js:126)
    at l.$get.l.$digest (angular.min.js:123)
    at l.$get.l.$apply (angular.min.js:126)
    at l (angular.min.js:81)

If I take out the 'ng-include' line the error goes away. Any ideas?

Cheers

4

1 回答 1

1

原来问题是由于使用了比名角(1.2.26)要求的更新版本的AngularJS。浪费了我生命中的几个小时,只能怪我自己...... -.- 好吧,也许它在未来会帮助别人。

于 2015-02-08T15:37:04.460 回答