小编mru*_*ova的帖子

使用jQuery将表单数据转换为JavaScript对象

如何将表单的所有元素转换为JavaScript对象?

我想有一些方法从我的表单中自动构建一个JavaScript对象,而不必遍历每个元素.我不想要返回的字符串,$('#formid').serialize();也不想要返回的地图$('#formid').serializeArray();

javascript jquery serialization json

1580
推荐指数
21
解决办法
95万
查看次数

AngularJS与Angular

几个月前,我决定研究Angular.当我做一些进步并使用它创建一些应用程序时,我意识到Angular 2处于开发人员预览中,因此它将在它发布之前的时间问题.因为Angular 2不会与Angular 1兼容,并且有很多变化,问题是,继续使用Angular 1.x开发还是开始开发Angular 2会更好吗?

事实上,我们并不总是必须使用市场上的最新版本或最新语言,但在这种情况下,应用程序仍然很小,所以我可以毫无问题地进行更改.

angularjs angular

144
推荐指数
5
解决办法
7万
查看次数

在angular2中有没有替代ng-disabled?

我正在使用angular2进行开发,并想知道ng-disabled在angular2中是否有任何替代方案.

对于前者 下面的代码是angularJS:

<button ng-disabled="!nextLibAvailable" ng-click="showNext('library')" class=" btn btn-info btn-xs" title="Next Lib >> {{libraries.name}}">
    <i class="fa fa-chevron-right fa-fw"></i>
</button>
Run Code Online (Sandbox Code Playgroud)

只是想知道如何实现此功能?任何输入?

angular-directive angular

135
推荐指数
4
解决办法
16万
查看次数

去除角度6材料垫选择更改方法

在Angular Material Design 6中,删除了(更改)方法.当用户更改选择时,我无法找到如何替换更改方法以执行组件中的代码谢谢!

angular angular6

84
推荐指数
5
解决办法
7万
查看次数

ng:使用angular-cli创建新项目时找不到命令

使用(npm install -g angular-cli)全局安装angular-cli 但是当我尝试使用ng new my-project它创建项目时抛出错误:

ng:找不到命令

npm angular-cli angular

75
推荐指数
19
解决办法
11万
查看次数

与您的操作系统或体系结构不兼容:fsevents@1.0.11

我正在使用Ubuntu 15.04.运行以下命令时:

npm install fsevents
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.11
npm WARN tutorial@1.0.0 No repository field.
Run Code Online (Sandbox Code Playgroud)

有人解决了吗?

javascript fsevents node.js npm npm-install

65
推荐指数
3
解决办法
5万
查看次数

使用momentjs更改Angular Material中md-datepicker的格式

角材料介绍找到了一个新的日期选取器组件在这里.

我希望此组件返回的日期格式为yyy-mm-dd,但我不确定这是如何完成的.通过搜索我发现$mdDateLocaleProvider可以使用,但我找不到使用它的例子.

有人能告诉我一个格式化返回日期的工作示例md-datepicker吗?

javascript localization angularjs momentjs angular-material

58
推荐指数
6
解决办法
8万
查看次数

无法在RxJs 6和Angular 6中使用Observable.of

 import { Observable, of } from "rxjs";

// And if I try to return like this
  return Observable.of(this.purposes);
Run Code Online (Sandbox Code Playgroud)

我收到一个错误说明,'''类型'不存在'Observable'属性'

angular angular-observable rxjs6

54
推荐指数
1
解决办法
4万
查看次数

升级到angular-6.x会出现"Uncaught ReferenceError:global is not defined"

我将我的项目从angular-5.x升级到angular-6.x并且它开始给出以下错误,甚至创建虚拟全局变量也不起作用,如此处给出Angular 6 Auth0 - 全局未定义

错误如下:

Uncaught ReferenceError: global is not defined
    at Object../node_modules/has-binary2/index.js (index.js:10)
    at __webpack_require__ (bootstrap:81)
    at Object../node_modules/socket.io-parser/index.js (index.js:8)
    at __webpack_require__ (bootstrap:81)
    at Object../node_modules/socket.io-client/lib/index.js (index.js:7)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app4pc/apiConnection/services/ApiConnectionServer.ts (auth.interceptor.ts:8)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app4pc/apiConnection/toServer.module.ts (ApiConnectionServer.ts:11)
    at __webpack_require__ (bootstrap:81)
Run Code Online (Sandbox Code Playgroud)

解决这个后,我得到以下错误:

Uncaught ReferenceError: process is not defined
    at Object../node_modules/process-nextick-args/index.js (index.js:3)
    at __webpack_require__ (bootstrap:81)
    at Object../node_modules/readable-stream/lib/_stream_readable.js (_stream_readable.js:26)
    at __webpack_require__ (bootstrap:81)
    at Object../node_modules/readable-stream/readable-browser.js (readable-browser.js:1)
    at __webpack_require__ (bootstrap:81)
    at Object../node_modules/simple-peer/index.js (index.js:7)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/util/services/call.services.ts (notification.service.ts:12)
    at __webpack_require__ (bootstrap:81) …
Run Code Online (Sandbox Code Playgroud)

javascript angular-cli angular angular6

47
推荐指数
4
解决办法
3万
查看次数

Jquery不工作在角度6错误:ENOENT:没有这样的文件或目录,打开'... \node_modules\jquery\dist\jquery.min.js'

我正在将Angular 5项目迁移到Angular 6.

在开始申请时

npm start
Run Code Online (Sandbox Code Playgroud)

得到以下错误

 ** Angular Live Development Server is listening on localhost: 9000, 
open your browser on http://localhost:9000/ **
91% additional asset processing scripts-webpack-plugin× ?wdm?: 
Error: ENOENT: no such file or directory,open'\trunk\node_modules\jquery\dist\jquery.min.js'
Run Code Online (Sandbox Code Playgroud)

我试过了

npm install jquery --save
npm install @types/jquery --save
Run Code Online (Sandbox Code Playgroud)

什么都行不通

我检查了我的节点模块文件夹,我可以看到jquery文件

粘贴下面的package.json和angular.json

的package.json

"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"@ng-bootstrap/ng-bootstrap": "^2.0.0",
"bootstrap": "^4.1.1",
"core-js": "^2.5.4",
"font-awesome": "^4.7.0",
"jquery": "^3.3.1",
"@types/jquery": …
Run Code Online (Sandbox Code Playgroud)

jquery angular angular6

27
推荐指数
4
解决办法
3万
查看次数