流星角度更新到1.3.4.4(从1.3.4.1)打破了模板

前端之家收集整理的这篇文章主要介绍了流星角度更新到1.3.4.4(从1.3.4.1)打破了模板前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
今天在我的meteor-angular项目(工作版本为1.3.4.1)中运行meteor更新后,没有任何加载,并且控制台中出现多个错误,例如:

angular_angular.js?hash=08f63d2…:13439 
    Error: [angular-meteor][err][404] client/templates/base.html - HTML template does not exists! You can disable this error by following this guide http://www.angular-meteor.com/api/1.3.11/templates
    at Object.$provide.decorator.$delegate.get (templates-handler.js:33)
    at sendReq (angular_angular.js?hash=08f63d2…:11408)
    at serverRequest (angular_angular.js?hash=08f63d2…:11148)
    at processQueue (angular_angular.js?hash=08f63d2…:15772)
    at angular_angular.js?hash=08f63d2…:15788
    at Scope.$eval (angular_angular.js?hash=08f63d2…:17040)
    at Scope.$digest (angular_angular.js?hash=08f63d2…:16856)
    at Scope.$apply (angular_angular.js?hash=08f63d2…:17148)
    at bootstrapApply (angular_angular.js?hash=08f63d2…:1728)
    at Object.invoke (angular_angular.js?hash=08f63d2…:4640)

(每个模板一个错误).

重要的是要注意在升级之前一切都很完美.

加载模板的代码

$stateProvider.state('base',{
        abstract: true,templateUrl: 'client/templates/base.html',controller: 'BaseCtrl as base',...

想法?

==编辑2016.7.27 ==

无论问题是什么,它现在都已修复.今天我跑:

meteor update --release 1.3.5.1

流星更新了,一切都像魅力一样!

注意:更新到meteor 1.4时仍会出现此问题

解决方法

使用以下样式

import templateUrl from './meteorSample.html'

angular.module(module.name)
  .component('meteorSample',{
   templateUrl
 })

猜你在找的Angularjs相关文章