アプリケーションに Google Webkit 機能を追加する必要があります。マウスを「+」記号の上に置くと、展開され、「写真の挿入」、「リンクの挿入」などのさまざまなオプションが表示されます。Angularjs は初めてです。どんな助けでも大歓迎です。
2 に答える
3
このような単純なディレクティブである ng-mouseenter と ng-mouseleave を利用できます。
myApp.directive('expando', function () {
return {
restrict: 'A',
scope: {
},
controller: ['$scope', function ($scope) {
$scope.open = false;
}],
link: function ($scope, elem, attrs, ctrl) {
$scope.toggleState = function () {
if ($scope.open) {
$scope.open = false;
} else {
$scope.open = true;
}
};
},
replace: true,
transclude: true,
template: '<div ng-mouseenter="toggleState()" ng-mouseleave="toggleState()"> <span ng-hide="open" class="sectionIndicator">+</span> <div ng-show="open" class="inline" ng-transclude></div> </div>'
};});
おそらくあなたが必要とすることをするでしょう。ここにフィドルがあります - http://jsfiddle.net/LukeMaso/LwFws/
于 2013-09-11T20:59:39.917 に答える