小编Man*_*ril的帖子

Ionic Framework:$ scope在简单警报中未定义

.controller('newGoalCtrl', function($scope, $ionicPopup) {
    $scope.addNewGoal = function() {
        alert($scope.goaltitle);
    };
});

<ion-pane view-title="goal">
   <ion-header-bar class="bar-positive">
      <div class="buttons">
          <a nav-transition="android" class="button button-icon icon ion-arrow-left-b" ng-click="" href="#/index"></a>
      </div>
      <h1 class="title">Add New Goal</h1>
    </ion-header-bar>


    <ion-content class="padding" scroll="false" >
        <div class="list">
            <label class="item item-input">
                <input type="text" placeholder="#Title" ng-model="goaltitle">
            </label>
            <label class="item item-input">
                <span class="hashtag-title">#{{hashtagname}}</span>
            </label>
            <label class="item item-input">
              <textarea placeholder="Goal"></textarea>
            </label>
        </div>
    </ion-content>


    <ion-tabs class="tabs-icon-top tabs-color-active-positive">
        <button class="button button-positive button-bar no-round-corner" ng-click="addNewGoal()">Add Goal</button>
    </ion-tabs>
</ion-pane>
Run Code Online (Sandbox Code Playgroud)

这是我的代码......我不知道如何解释但是当我在文本框中输入内容时它总是说未定义...

但$ scope.goaltitle ="something"正在处理.controller(); ...

javascript angularjs angularjs-scope ionic-framework

2
推荐指数
1
解决办法
703
查看次数

Google Apps 脚本_将浮点数转换为日期

我的谷歌电子表格中有一个单元格的值为 5/31/2016 0:22:38,但是当我编写脚本来获取数据时,它返回 42521.015713761575。我已经尝试过 jquery 将数字转换为日期的一些代码但大多数返回可以追溯到 1970 年。我如何才能将所述浮点格式格式化为上面指定的日期?谢谢... :)

javascript google-sheets google-apps-script

-1
推荐指数
1
解决办法
2022
查看次数