加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-17 17:16:41 所属栏目:安全 来源:网络整理
导读:今天在我的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 ex
今天在我的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
 })

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读