首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:无法从EmberCLI中的meta标记读取配置

错误:无法从EmberCLI中的meta标记读取配置
EN

Stack Overflow用户
提问于 2016-07-11 20:15:11
回答 0查看 947关注 0票数 3

我在我的EmberCLI应用程序上收到以下错误:无法从名为" my -app- name / config /environment“的meta标签中读取配置

我读到它与拥有正确的内容有关-在app/index.html中的handlebars,但我在那里有所有的内容:

代码语言:javascript
复制
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>My app name</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    {{content-for "head"}}
    <link rel="stylesheet" href="assets/vendor.css">
    <link rel="stylesheet" href="assets/my-app-name.css">

    {{content-for "head-footer"}}
  </head>
  <body>
    {{content-for "body"}}

    <script src="assets/vendor.js"></script>
    <script src="assets/my-app-name.js"></script>

    {{content-for "body-footer"}}
  </body>
</html>

我的config/environment.js .js文件是:

代码语言:javascript
复制
/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'my-app-name',
    environment: environment,
    contentSecurityPolicy: { 'connect-src': "'self' https://auth.firebase.com wss://*.firebaseio.com" },
    firebase: 'https://my-app-name.firebaseio.com/',
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };

  if (environment === 'development') {
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    // ENV.APP.LOG_TRANSITIONS = true;
    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
  }

  if (environment === 'test') {
    // Testem prefers this...
    ENV.baseURL = '/';
    ENV.locationType = 'none';

    // keep test console output quieter
    ENV.APP.LOG_ACTIVE_GENERATION = false;
    ENV.APP.LOG_VIEW_LOOKUPS = false;

    ENV.APP.rootElement = '#ember-testing';
  }

  if (environment === 'production') {
  }

  return ENV;
};

我是不是遗漏了一个元标签?这是否也是我的浏览器仅在我通过firebase部署应用时才显示的原因:{{content-for "head"}} {{content-for "head-footer"}} {{content-for "body"}} {{content-for "body-footer"}}

谢谢!

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38306685

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档