在Angularjs中保存来自Popover的表单数据

在Angularjs中保存来自Popover的表单数据,angularjs,angularjs-directive,angularjs-scope,angular-ui-bootstrap,Angularjs,Angularjs Directive,Angularjs Scope,Angular Ui Bootstrap,var-App=angular.module('myApp',[]); 应用程序控制器('myPopoverCtrl', 职能($范围){ $scope.mypover={ 伊索彭:错, open:函数open(){ $scope.myPopover.isOpen=true; }, 关闭:函数关闭(){ //警报(“hi”); $scope.myPopover.isOpen=false; } }; $scope.SaveNotes=function(){ console.log('hi'); l

var-App=angular.module('myApp',[]);
应用程序控制器('myPopoverCtrl',
职能($范围){
$scope.mypover={
伊索彭:错,
open:函数open(){
$scope.myPopover.isOpen=true;
},
关闭:函数关闭(){
//警报(“hi”);
$scope.myPopover.isOpen=false;
}
};
$scope.SaveNotes=function(){
console.log('hi');
log($scope.noteText);
//这里没有定义
返回false;
}
});

添加

我认为您希望使用模态而不是像这样的popover,因为popover实际上只是显示文本:-

var modalInstance = $modal.open({
                    animation: $rootScope.animationsEnabled,
                    templateUrl: 'views/myTemplate.html',
                    size: 'md'
                }).result.then(function(result) {
                $scope.result = result;
            });

这是它为更多信息而设计的。

我认为您希望使用模态而不是像这样的popover,因为popover实际上只是显示文本:-

var modalInstance = $modal.open({
                    animation: $rootScope.animationsEnabled,
                    templateUrl: 'views/myTemplate.html',
                    size: 'md'
                }).result.then(function(result) {
                $scope.result = result;
            });

这是它为更多信息而设计的。

将您的代码放在jsfiddlei上,但遇到一些脚本问题您可以检查将您的代码放在jsfiddlei上,但遇到一些脚本问题您可以检查弹出窗口。我需要uib弹出窗口。我需要uib弹出窗口