如何将自定义数据传递给角带模式

我正在使用angular-strap的模态,并建立了自己的模板.我的问题是我的模板有2个按钮,但是,我会更改这些按钮的文本和功能.因此,我想在打开它之前将该数据传递给模态.

在文档中说

// Pre-fetch an external template populated with a custom scope
  var myOtherModal = $modal({scope: $scope,template: 'modal/docs/modal.tpl.demo.html'});

但是,我无法让它工作.请注意,我只想将一些值传递给模态范围,而不是我的整个父范围(这是示例似乎做的)

它不像ui-bootstrap那么简单,但它看起来更灵活:
// creates new isolated scope
var Mynewscope = $scope.$new(true);
// then you can data to your new scope
Mynewscope.users = ["User1","User2","User3"];
var myOtherModal = $modal({scope: Mynewscope,template: 'modal/docs/modal.tpl.demo.html'});

相关文章

ANGULAR.JS:NG-SELECTANDNG-OPTIONSPS:其实看英文文档比看中...
AngularJS中使用Chart.js制折线图与饼图实例  Chart.js 是...
IE浏览器兼容性后续前言 继续尝试解决IE浏览器兼容性问题,...
Angular实现下拉菜单多选写这篇文章时,引用文章地址如下:h...
在AngularJS应用中集成科大讯飞语音输入功能前言 根据项目...
Angular数据更新不及时问题探讨前言 在修复控制角标正确变...