2016-02-16から1日間の記事一覧

【JavaScript】時間の差の求め方

何時間以内なら「new」みたいにラベルを貼りたい時に現在時刻との時間の差が必要になる。 そんな時は以下のようにして求められる。 var now = new Date('2016/02/16'); var targetDate = new Date('2016/02/15'); var diff = (now.getTime() - targetDate.ge…

【AngularJS】factory使ってapiたたく

http://localhost:6960/api/v1/notices/index?access-token=[アクセストークン]&lang=jp みたいなURLの作り方 'use strict'; angular.module('spmartClientApp') .factory('Infomation', function ($resource, $http, $rootScope, DataService, $cookies) { …