【问题标题】:Angular not working correctly with Meteor 1.3.1Angular 无法与 Meteor 1.3.1 一起正常工作
【发布时间】:2016-07-28 10:33:39
【问题描述】:

我在 Windows 计算机上关注 www.angular-meteor.com 教程。

但是当我在控制台中运行meteor 时,我只看到:

socially以外的空白屏幕...

所以似乎某些角度包不适用于Meteor 1.3.1

这是meteor list的输出:

accounts-password               1.1.7  Password support for accounts
angular                         1.3.9_2  Everything you need to use Angu...
angularui:angular-google-maps   2.3.2  angular-google-maps (official)
angularui:angular-ui-bootstrap  0.13.0  Native AngularJS (Angular) direc...
angularui:angular-ui-router     0.2.15  angular-ui-router (official): Fl...
angularutils:pagination         0.9.1_2  Magical automatic pagination fo...
check                           1.1.3  Check whether a value matches a p...
dotansimha:accounts-ui-angular  0.0.4  AngularJS wrapper for Meteor's Ac...
email                           1.0.11  Send email messages
es5-shim                        4.5.9  Shims and polyfills to improve EC...
jquery                          1.11.7  Manipulate the DOM using CSS sel...
less                            2.5.7  Leaner CSS language
meteor-base                     1.0.3  Packages that every Meteor app needs
mobile-experience               1.0.3  Packages for a great mobile user ...
mongo                           1.1.6  Adaptor for using MongoDB and Min...
reactive-var                    1.0.8  Reactive variable
standard-minifier-css           1.0.5  Standard css minifier used with M...
standard-minifier-js            1.0.5  Standard javascript minifiers use...
tmeasday:publish-counts         0.7.3  Publish the count of a cursor, in...
tracker                         1.0.12  Dependency tracker to allow reac...
twbs:bootstrap                  3.3.6  The most popular front-end framew...

例如angularui:angular-ui-router 似乎无法正常工作。但它适用于meteor 1.2 版本。

有人遇到同样的问题吗?也许也是一个解决方案? 最好的问候

EDIT

删除dotansimha:accounts-ui-angular 导致我可以看到地图和搜索框。但是该应用程序仍然损坏。没有显示parties,分页不起作用等等......有什么解决办法吗?

【问题讨论】:

    标签: angularjs meteor angular-meteor


    【解决方案1】:

    我发现问题是这个包不兼容:

    meteor remove dotansimha:accounts-ui-angular
    

    不要忘记删除“app.js”上的依赖“accounts.ui”

    刚刚删除,结果:

    问题可能是为什么这个包使用了“blaze-html-templates”

    【讨论】:

    • 你想知道什么?:) 代码在 www.angular-meteor.com 教程步骤 17 上以 zip 格式提供:)
    • 在您的控制台上弹出一些错误?我要在这里下载.zip文件并测试一下
    • 看看这个解释有没有帮助!
    • 谢谢!现在可以看到地图,但应用程序仍然损坏。请参阅上面的Edit
    【解决方案2】:

    我想我现在可以工作了:

    meteor list

    accounts-password               1.1.7  Password support for accounts
    angular-meteor-auth             1.0.1  Angular-Meteor authentication module
    angular-templates               1.0.2  Compile angular templates into th...
    angular:angular                 1.5.3_1  AngularJS (official) release. F...
    angularui:angular-google-maps   2.3.2  angular-google-maps (official)
    angularui:angular-ui-bootstrap  0.13.0  Native AngularJS (Angular) direc...
    angularui:angular-ui-router     0.2.15  angular-ui-router (official): Fl...
    angularutils:pagination         0.9.1_2  Magical automatic pagination fo...
    check                           1.1.3  Check whether a value matches a p...
    dotansimha:accounts-ui-angular  0.0.4  AngularJS wrapper for Meteor's Ac...
    email                           1.0.11  Send email messages
    es5-shim                        4.5.9  Shims and polyfills to improve EC...
    jquery                          1.11.7  Manipulate the DOM using CSS sel...
    less                            2.5.7  Leaner CSS language
    meteor-base                     1.0.3  Packages that every Meteor app needs
    mobile-experience               1.0.3  Packages for a great mobile user ...
    modules                         0.5.2  CommonJS module system
    mongo                           1.1.6  Adaptor for using MongoDB and Min...
    pbastowski:angular-babel        1.3.2  Babel compiler and ng-annotate fo...
    reactive-var                    1.0.8  Reactive variable
    standard-minifier-css           1.0.5  Standard css minifier used with M...
    standard-minifier-js            1.0.5  Standard javascript minifiers use...
    tmeasday:publish-counts         0.7.3  Publish the count of a cursor, in...
    tracker                         1.0.12  Dependency tracker to allow reac...
    twbs:bootstrap                  3.3.6  The most popular front-end framew...
    

    所以我确实使用accounts-ui-angular

    我关注了this link

    我所做的是:

    First:

    1. 删除您通过大气安装的角度流星包:meteor remove angular
    2. 确保已安装 ecmascript 软件包。如果您之前安装了大气角度包,您可能在收到多个编译器正在尝试处理扩展名为 .js 的文件的通知后将其删除。因此,请查看流星列表,如果没有 ecmascript,请执行以下操作:meteor add ecmascript
    3. 通过 npm 安装 angular 和 angular meteor:npm install angular angular-meteor --save
    4. 将 'angular-meteor' 列为主模块的模块依赖项:angular.module('myApp', ['angular-meteor']);
    5. 流星删除 ecmascript
    6. meteor 添加模块(ecmascript 隐含模块,因此如果您删除 ecma,则必须手动添加)
    7. 流星添加 pbastowski:angular-babel

    注意我do not需要在app.js中导入angular(没有import angular from 'angular';import 'angular-meteor';

    现在:

    希望对遇到同样问题的人有所帮助:)

    【讨论】:

      猜你喜欢
      • 2021-07-17
      • 2016-09-27
      • 2016-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-07
      相关资源
      最近更新 更多