我是流浪汉的新手,但几个月前我曾尝试过一次.
现在它只是没有开始工作,我已经生成了puphpet配置并下载了 - 当然ruby并且已经安装了puppet gem和virtualbox - 但是当我点击vagrant时它会推送有关证书的错误,等等:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/trusty64' could not be found. Attempting to fin
install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/trusty64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are …Run Code Online (Sandbox Code Playgroud) 我在谷歌搜索这个问题,但仍然无法找到正确的讨论.我们在一个表单(angularJS app)中使用valdr和ui select,我们遇到的问题是ui-select渲染的输入不会获得name属性,因此,angular会抛出一个错误:
Error: Form element with ID "undefined" is not bound to a field name.
at d.link (http://localhost:8080/bower_components/valdr/valdr.min.js:1:8414)
at invokeLinkFn (http://localhost:8080/bower_components/angular/angular.js:8141:9)
at nodeLinkFn (http://localhost:8080/bower_components/angular/angular.js:7653:11)
at compositeLinkFn (http://localhost:8080/bower_components/angular/angular.js:7009:13)
at nodeLinkFn (http://localhost:8080/bower_components/angular/angular.js:7648:24)
at http://localhost:8080/bower_components/angular/angular.js:7884:13
at processQueue (http://localhost:8080/bower_components/angular/angular.js:13071:27)
at http://localhost:8080/bower_components/angular/angular.js:13087:27
at Scope.$get.Scope.$eval (http://localhost:8080/bower_components/angular/angular.js:14287:28)
at Scope.$get.Scope.$digest (http://localhost:8080/bower_components/angular/angular.js:14103:31) <input type="text" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="form-control ui-select-search ng-pristine ng-untouched ng-valid" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.searchEnabled && $select.open">
Run Code Online (Sandbox Code Playgroud)
所以我们在ui-select指令上尝试了一些hack-select指令,例如templateCache重写/修改,隐藏的输入使用相同的模型,但结果是相同的.
btw templateCache重写是最糟糕的方法,因为这个指令在appwide中被其他指令使用,我们无法破解整个应用程序.
有人遇到过这个问题吗?
angularjs angularjs-directive valdr ui-select angularjs-ui-utils
大家好
我对sequelizejs很陌生,只是尝试使用它。我在使用sequelize-fixtures创建示例数据集时遇到问题。
我的模型是这样创建的:
User.js (不包含beforeCreate,beforeUpdate挂钩)
'use strict';
module.exports = function (sequelize, DataTypes) {
var User = sequelize.define('User', {
email: {type: DataTypes.STRING, allowNull: false},
password: {type: DataTypes.STRING, allowNull: false},
active: {type: DataTypes.BOOLEAN, default: false}
});
return User;
};
Run Code Online (Sandbox Code Playgroud)
Role.js
'use strict';
module.exports = function (sequelize, DataTypes) {
var Role = sequelize.define('Role', {
title: {type: DataTypes.STRING, allowNull: false},
description: {type: DataTypes.STRING, allowNull: true},
code: {type: DataTypes.STRING, allowNull: false}
});
return Role;
};
Run Code Online (Sandbox Code Playgroud)
将模型导入模型对象后,我创建了它们之间的关联:
models.User.belongsToMany(models.Role, {through: 'UserRole', constraints: true});
models.Role.belongsToMany(models.User, {through: …Run Code Online (Sandbox Code Playgroud)