This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
exec = require('child_process').exec, | |
uglify = require('gulp-uglify'), | |
inject = require('gulp-inject'), | |
jshint = require('gulp-jshint'), | |
angularFilesort = require('gulp-angular-filesort') | |
bs = require('browser-sync').create(), | |
nodemon = require('gulp-nodemon'); | |
var paths = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//生成した描画用のJSONデータをコピペ | |
var data = { | |
"name": "petalLength <= 2.45", | |
"children": [ | |
{ | |
"name": "setosa: 50" | |
}, | |
{ | |
"name": "petalWidth <= 1.75", | |
"children": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var angular = require('angular'); | |
var app = angular.module('sampleApp',[]); | |
console.log(app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp', ['restangular']) | |
.run(function($rootScope, $state, Restangular, user) { | |
Restangular.setErrorInterceptor(function(response, deferred, responseHandler) { | |
if(response.status === 401) { | |
$state.go('login') | |
} | |
else if(response.status === 409) { | |
// send signal to SignupController | |
$rootScope.$broadcast('conflict') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp', ['ui.bootstrap', 'ui.router']) | |
.config(function($locationProvider, $stateProvider, $urlRouterProvider, $httpProvider){ | |
$locationProvider.html5Mode({ | |
enabled: true, | |
requireBase: false | |
}) | |
$urlRouterProvider.otherwise('/login') | |
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest' | |
$httpProvider.interceptors.push(function($q, $location) { |