【问题标题】:customize the popover in angularJS在 angularJS 中自定义弹出框
【发布时间】:2014-03-20 13:30:24
【问题描述】:

在弹出窗口中,我想在其中显示一些文本框和按钮。 http://plnkr.co/edit/2gqXoI7Gc7MtT8Ac264R?p=preview 在此链接中,弹出框带有文本“我的内容”,而不是想要显示 html 元素。

【问题讨论】:

标签: angularjs popover angular-ui-bootstrap


【解决方案1】:

替换您的 popover 属性
popover="{{ content }}" 

你的 example.js 像这样:

angular.module('plunker', ['ui.bootstrap'])
.controller('PopoverCtrl', function PopoverCtrl($scope) {
    $scope.content = "test";
  });

虽然这是非常基本的 angularjs 内容,但我认为您需要阅读一些文档。

【讨论】:

  • 如果它解决了您最初的问题,请考虑接受答案。
  • 如何将输入框带入弹出框
  • 这是一个不同且不相关的问题。
  • 我在问题中提到的不相关的是什么
  • 你需要查看this,如果你想绑定模型,你可能不得不查看$compile。但是你需要先做太多的阅读。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-08-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-04-29
相关资源
最近更新 更多