我有一个非常基本的角度JS问题。有谁能给我解释一下为什么。
{{hi}}
没有进行评估,我得到了以下错误:
Uncaught TypeError: angular.module is not a function
这是,代码在下面。
Html:
<!DOCTYPE html>
<html>
<head>
<script src="https://code.angularjs.org/2.0.0-alpha.20/angular2.sfx.dev.js"></script>
<script s
我的系统js配置看起来像
/**
* Created by nick_ on 5/7/2016.
*/
(function(global) {
// map tells the System loader where to look for things
var map = {
'app': 'app', // 'dist',
'rxjs': 'node_modu
当我使用--prod flag.It构建angular应用程序时,我得到了以下错误,而我没有使用该标志(代码在ng serve上运行良好):
licenseType.indexOf is not a function
TypeError: licenseType.indexOf is not a function
at LicenseTextReader.readLicense (D:\e\todoListFront\node_modules\@angular-devkit\build-angular\node_modules\license-webpack-plugin\dist\L
当我启动我的角2应用程序时,应用程序总是处于加载阶段。
在chrome控制台中,我可以看到以下内容:
Error: (SystemJS) core_1.InjectionToken is not a constructor
TypeError: core_1.InjectionToken is not a constructor
at Object.eval (http://localhost:3000/node_modules/ng-pick-datetime/lib/translations.js:9:24)
我的设计是:
@angular/cli: 1.0.0
我在github上学习了以下教程:
我安装了node+npm并运行了npm install。克隆git存储库,运行npm install,然后当我想运行npm start时,它会失败并显示错误消息。
这是调试日志
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 ver
我在浏览器日志中得到以下异常:
没有在警报上找到指令注释
堆栈跟踪:
Error: No Directive annotation found on Alert
at new BaseException (webpack:///./~/angular2/src/facade/exceptions.js?:15:23)
at DirectiveResolver.resolve (webpack:///./~/angular2/src/core/linker/directive_resolver.js?:41:15)
at RuntimeMetadataResolver.getDirect
我正在构建一个angular应用程序,当我在本地机器上执行ng服务时,它工作得很好。但在firebase上部署应用程序后,它会导致错误。
Unhandled Promise rejection: No provider for e! ; Zone: angular ; Task: Promise.then ; Value: Error: No provider for e!
at k (vendor.e0a9c104ecc1b06ef61f.bundle.js:1)
at E (vendor.e0a9c104ecc1b06ef61f.bundle.js:1)
at t._throwOrNull
我想使用nativescript-youtubeplayer / nativescript-youtubeplayer-inline npm软件包在我的本地手机应用程序中播放youtube视频。我遵循了提供的步骤,当我试图使用tns运行android 命令构建我的应用程序时,我面临以下错误。
*JS: ERROR Error: Uncaught (in promise): TypeError: Class constructor View cannot be invoked without 'new'
JS: TypeError: Class constructor View
我在另一个组中找到了以下指令。但是没有关于如何使用它的说明:
appModule.directive('scrollpane',function($compile)
{
return {
restrict: 'A',
link: function(scope , element , attrs) {
element.addClass('scroll-pane');
element.jScrollPane();
var api = ele
大家好,我是Angular2的新手,当我尝试用官方angular.io站点上的示例运行npm测试时,我得到了这个错误:
providers[name][0] is not a function
TypeError: providers[name][0] is not a function
at get (/Users/marcpursals/repos/..../node_modules/di/lib/injector.js:48:43)
at /Users/marcpursals/repos/...../node_modules/di/lib/injector.js:71:1
我尝试通过引导混合ng1和ng2来从angular1升级到angular2。
下面是代码:
当我运行这个例子时,我得到一个错误,说:
Cannot read property 'get' of undefined
at HeroDetailDirective.UpgradeComponent (https://unpkg.com/@angular/upgrade/bundles/upgrade-static.umd.js:512:43)
at new HeroDetailDirective (https://run.plnkr.co/QOdaB9QdPbHLfQe9/app/
我是Angular和Angular 2的新手,我想在我的项目中使用以下外部库:
为了使用这个库,我在我的index.html文件中将以下行放在了angular之前:
<script src="./lib/angular-canvas-area-draw.js"></script>
但我有以下错误:
Uncaught ReferenceError: angular is not defined
at angular-canvas-area-draw.js:3
at angular-canvas-area-draw.js:234
我该如何解决这个问题?
首先,我是个新手,带着咕噜声和天使语,这基本上是我的第一个真正的项目。我喜欢使用持续集成,因为我决定使用grunt来构造我的发行代码。
我使用了下面的文件配置:
module.exports = function(grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
我正在研究angularjs和node.js。
问题:
在控制器的小型化版本(角控制器js文件)中,我得到了以下错误。但它在正常版本中起作用。
错误:
Error: [$injector:unpr] http://errors.angularjs.org/1.2.25/$injector/unpr?p0=eProvider%20%3C-%20e
at Error (native)
at http://localhost:8080/assets/lib/js/angularjs/angular.min.js:6:450
at http://localhost:8080/assets/lib/js
我正在尝试为我的Ionic项目使用cordova-plugin-inappbrowser,但是当我安装了所有依赖项并运行“for”时,看起来是这样的
Error: Cannot find module "."
at webpackMissingModule (http://localhost:8100/build/vendor.js:95121:70)
at Object.get (http://localhost:8100/build/vendor.js:95121:148)
at Object.module.exports.obj (http://localhost:
我开始了,但在第一部分就卡住了。
我做了什么
我遵循了指南,直到ng serve --open都运行得很好,而这个命令在其他一些错误消息之后给出了一个错误webpack: Failed to compile,浏览器打开后只显示了:Cannot GET /
完整的错误日志:
C:\Users\ppete\Documents\DEV\!Angular\test1>ng serve --open
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost: