angular 表带的两种方式绑定
Two way binding for angular strap
我是 angularjs 的新手,我正在使用 angular strap 来使用它们的一些功能,比如 aside。
所以基本上我有这样的功能:
$scope.myAside = function() {
$aside({
title: 'My Title',
show: true,
animation: 'am-slide-left',
placement:'left',
contentTemplate: 'views/aside.html'
});
};
我想知道如何使用两个绑定来让'show'显示在页面上。我基本上想要页面上有这样的东西:
The aside is open: {{myAside.show}}
我通读了他们的设置,但找不到任何关于两个绑定的信息以及如何知道旁边模式是否打开。
这是带有相关文档的插件。 http://mgcrea.github.io/angular-strap/#/asides
您需要使用{{ myAside.$scope.$isShown }}
这里 plnkr 展示了它是如何工作的。
我是 angularjs 的新手,我正在使用 angular strap 来使用它们的一些功能,比如 aside。
所以基本上我有这样的功能:
$scope.myAside = function() { $aside({ title: 'My Title', show: true, animation: 'am-slide-left', placement:'left', contentTemplate: 'views/aside.html' }); };
我想知道如何使用两个绑定来让'show'显示在页面上。我基本上想要页面上有这样的东西:
The aside is open: {{myAside.show}}
我通读了他们的设置,但找不到任何关于两个绑定的信息以及如何知道旁边模式是否打开。
这是带有相关文档的插件。 http://mgcrea.github.io/angular-strap/#/asides
您需要使用{{ myAside.$scope.$isShown }}
这里 plnkr 展示了它是如何工作的。