textarea批量添加数据

smdncfj3  于 2021-06-18  发布在  Mysql
关注(0)|答案(0)|浏览(219)

我从安格拉斯开始。
他结合CodeIgniter3构建了一个小应用程序。
我创造了积垢,一切正常。
但是,我想添加一个textarea,在其中我将以以下格式添加大量信息:
链接1.com
链接2.com
链接3.com
数据将进入数据库并保存为唯一记录。
我的Angular -代码:

$scope.noteCreated = function( note ){
    $http({
      method: 'POST', url: 'api/admin/notes/create/', data: {'note' : note}}
      ).then(function (){
        $scope.success = true;

        $timeout( function(){
          $scope.success = false;
          $scope.note = {};

        }, 2000);

   },function (error){
      console.log('Error');
   });
}

我的html代码:

<form ng-submit="noteCreated(note)">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <label>Note</label>
                <div text-angular="text-angular" ng-model="note.noted" required></div> 

                <select ng-model="note.id_domain_rel" chosen="directiveOptions" ng-options="item.id as item.domain_name for item in domain track by item.id" required><option value=""></option>
                </select> 
            </div>

    </div>
</div>
<button type="submit" class="btn btn-primary" ng-if="!success">Save</button>
<button type="button" class="btn btn-success" ng-if="success" disabled>Saved</button>
</form>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题