我刚刚开始讨论Angularjs,并在文档中看到了下面的内容,我如何调整它以使用ng-bind-html作为与ng-model相反的方法.我假设同时使用ng-bind-html和ng-model会发生冲突?
angular.module('customControl', []).
directive('contenteditable', function() {
return {
restrict: 'A', // only activate on element attribute
require: '?ngModel', // get a hold of NgModelController
link: function(scope, element, attrs, ngModel) {
if(!ngModel) return; // do nothing if no ng-model
// Specify how UI should be updated
ngModel.$render = function() {
element.html(ngModel.$viewValue || '');
};
// Listen for change events to enable binding
element.on('blur keyup change', function() {
scope.$apply(read);
});
read(); // initialize
// Write data to the model
function read() { …Run Code Online (Sandbox Code Playgroud) 尝试使用以下方法安装cordoba-plugin-zip时:
cordova plugin add https://github.com/MobileChromeApps/zip.git
Run Code Online (Sandbox Code Playgroud)
记录(https://github.com/MobileChromeApps/cordova-plugin-zip),
我收到以下404错误消息.它尝试引用的cordova-plugin文件是否被移动了?如果是这样,我如何告诉插件在其他地方寻找它?
Installing "cordova-plugin-zip" for ios
Fetching plugin "cordova-plugin-file" via plugin registry
npm http GET http://registry.cordova.io/cordova-plugin-file
npm http 404 http://registry.cordova.io/cordova-plugin-file
Failed to install 'cordova-plugin-zip':Error: 404 Not Found: cordova-plugin-file
Run Code Online (Sandbox Code Playgroud)