我正在使用材料设计日期选择器
<md-content flex class="padding-top-0 padding-bottom-0" layout="row">
<md-datepicker ng-model="user.submissionDate" md-placeholder="Start date" flex ng-click="ctrl.openCalendarPane($event)"></md-datepicker>
<md-datepicker ng-model="user.submissionDate" md-placeholder="Due date" flex></md-datepicker>
</md-content>
Run Code Online (Sandbox Code Playgroud)
我想删除日历图标并在输入框中包含ng-click功能.
如何将运行时事件与输入框绑定?
CSS
<style>
.inputdemoBasicUsage .md-datepicker-button {
width: 36px; }
.inputdemoBasicUsage .md-datepicker-input-container {
margin-left: 2px;
}
.md-datepicker-input-container{
display:block;
}
.md-datepicker-input[placeholder]{
color=red;
}
.padding-top-0{
padding-top:0px;}
.padding-bottom-0{
padding-bottom:0px;
}
</style>
Run Code Online (Sandbox Code Playgroud) ctrl.js
在控制器中,如果用户登陆编辑页面,则值为 true
var self = this;
self.edit = "true"
Run Code Online (Sandbox Code Playgroud)
html
在添加页面上应该是
<md-input-container flex="25">
<label>GameId</label>
<input name="games" ng-model="ctrl.game" ng-required="true" ng-maxlength="50" custome-directive-to-check-unique-value >
</md-input-container>
Run Code Online (Sandbox Code Playgroud)
在编辑页面上应该是
<md-input-container flex="25">
<label>GameId</label>
<input name="games" ng-model="ctrl.game" ng-required="true" ng-maxlength="50" disabled>
</md-input-container>
Run Code Online (Sandbox Code Playgroud)
对于禁用,我可以使用ng-disabled=ctrl.edit禁用输入字段如何执行指令 custome-directive-to-check-unique-value
签出后我实现了下面的代码,但效果没有发生,不知道它缺乏的地方..
<style>
.rotate {
-webkit-transition: -webkit-transform 0.4s ease-in-out;
-moz-transition: -moz-transform 0.4s ease-in-out;
-o-transition: -o-transform 0.4s ease-in-out;
-ms-transition: -ms-transform 0.4s ease-in-out;
transition: transform 0.4s ease-in-out;
cursor:pointer;
}
.rotate:hover {
color:#afafaf;
-webkit-transform: rotateZ(360deg);
-moz-transform: rotateZ(360deg);
-ms-transform: rotateZ(360deg);
-o-transform: rotateZ(360deg);
transform: rotateZ(360deg);
}
</style>
Run Code Online (Sandbox Code Playgroud)
HTML
<div class="col-lg-6 col-md-6 col-sm-12">
<h2 align="center"><a href="abc.php" class="rotate"> <icon class="icon icon-rocket icon-2x "> </icon> </a> <br />
Build your Resume </h2>
</div>
Run Code Online (Sandbox Code Playgroud)
编辑:将旋转CLASS从图标更改为父级
我需要使用角度来更改用于quill.Js的工具栏,我尝试使用<ng-quill-toolbar></ng-quill-toolbar>它,但是它没有按预期工作,并且在多个编辑器上导致了错误,有没有一种方法可以使用quill.Js中给出的选项对其进行更改使用角度文件
https://quilljs.com/docs/configuration/
模块配置
(function() {
'use strict';
angular
.module('app')
.config(['ngQuillConfigProvider', function (ngQuillConfigProvider) {
ngQuillConfigProvider.set();
}]);
})();
Run Code Online (Sandbox Code Playgroud)
控制者
(function () {
'use strict';
angular
.module('app')
.controller('Ctrl', Ctrl);
function Ctrl($document) {
var doc = $document[0];
var container = doc.getElementsByClassName('editor');
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{'header': 1}, {'header': 2}], // custom button values
[{'list': 'ordered'}, {'list': 'bullet'}],
[{'script': 'sub'}, {'script': 'super'}], // superscript/subscript
[{'indent': '-1'}, {'indent': '+1'}], // outdent/indent
[{'direction': 'rtl'}], // text …Run Code Online (Sandbox Code Playgroud)