问题标签 [yeoman-generator-angular]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - AngularJS 工厂不起作用(Yeoman)
我正在尝试学习 AngularJS,并因此制作了一个非常简单的 Angular 应用程序。一切正常,直到我试图通过制造工厂来拆分我的控制器(我认为这是正确的做法)。现在我的主/索引只显示一个空页面,与工厂实施之前一样,表单正在显示。我想不通!注意:我正在使用 Yeoman 的 Angular 设置。
文件夹结构:
- 控制器
- about.js
- 转换.js
- main.js
- 应用程序.js
这是我的主/索引页面(main.html):
我的控制器(main.js):
还有我的工厂(conversion.js):
和 app.js:
angularjs - AngularStack Facebook、Google+ 和 Twitter 身份验证
我正在使用 Generator Angular Fullstack 制作我的第一个 Web 应用程序。我在这里完成了项目初始化: https ://github.com/DaftMonk/generator-angular-fullstack
在初始化期间,我为以下内容设置了 oAuth:Facebook、Google+、Twitter
我也在使用 Openshift,在初始化项目之后......我使用这些步骤将其添加到 openshift。这包括为 RHC 设置用于 Facebook、Google+ 和 Twitter 身份验证的环境变量。我也添加了这些。
但是,使用我的新应用程序...我无法使用 Facebook、Google+ 或 Twitter 创建新帐户。当我创建新帐户时,这些是我得到的错误:
Facebook:
谷歌+:
推特:
到目前为止,除了完成教程之外,我还没有做太多事情。但我觉得我错过了什么。关于这个主题的任何帮助都会很棒。谢谢:)
yeoman-generator-angular - Yeoman-angular grunt generates faulty vendor.js with animation
I've got an app that uses a javascript animation.
When I run the build, grunt minifies and uglifies the code and creates a file 'vendor.js' containing all the library js code including angular. However the code that is generated is broken when I use my animate method shown below.
The error I see in the browser console is caused by the minified and uglified vendor.js
I may need to find a different approach to what I am doing, but I'd still like to address this problem specifically if possible.
In the following code I'm using angular to get access to the global rootscope as I want to trigger an action higher in the scope hierarchy than the element where the animation is registered.
Without this added behaviour, the animations are all working correctly, so there is no problem with the actual libraries that are ending up in vendor.js The answer may be to turn off uglification, or find a way to copy this specific script directly to the target instead of passing it through magnification and uglification.
});
javascript - AngularJS 指令范围似乎只接受一个参数
我开始学习AngularJS,但我一直坚持创建自己的服装指令。
所以,首先,我使用yeoman 项目来生成一个 AngularJS 项目,这是我的起点。
现在,进入主题——
我有以下代码:
应用程序.js:
索引.html:
主.js:
我的问题似乎是在我定义directive.scope 的行中的app.js 中找到的。每当它是这样的:
没有问题,一切正常。但是,当我删除评论块时,它看起来像这样:
它不起作用 - 页面不会显示模板,并且 angular 会抛出以下错误,这对我来说绝对什么也没说:
有人知道这里发生了什么吗?
gruntjs - Yeoman Angular,grunt 服务器总是启动 IE
刚开始使用 Yeoman Angular 生成器,但是当我运行 grunt server 命令时,它总是打开 IE。尝试在 GruntFile.js 中进行更改
但它给出了错误
任何线索如何让它工作?
javascript - 错误:[ng:areq] 参数不是函数,未定义,在 thinkster.io 的教程中
[更新] 这是我的一个愚蠢的错字。谢谢dfsq!
SO上有一个类似的问题,我的代码遵循推荐的答案,所以请不要将其标记为重复。
在我的本地主机中,我收到以下错误:Error: [ng:areq] Argument 'PostCtrl' is not a function, got undefined
app.js 的内容:
scripts/services/post.js 的内容:
scripts/posts.js 的内容:
post.html 的内容是:
仅渲染 html,不渲染任何关联的 js。该应用程序是使用 yeoman 搭建的。帮助将不胜感激!
javascript - 在 Passport.js 中获取当前用户
我有以下 Express.js 文件
用户使用 Facebook 登录后,在我的控制器中尝试执行
req.user
或req.session.passport.user
获取undefined
.
如何获取当前登录的用户?
yeoman-generator-angular - yeoman 应用程序中缺少 sass 导入文件
我在 main.scss b/w 中导入了 sass 文件
每当样式更改或我的应用程序重新启动时,导入的 scss 文件就会丢失。