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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 expireDate = new Date(); | |
expireDate.setDate(expireDate.getDate() + 1); | |
$cookies.put('myFavorite', 'oatmeal', {'expires': expireDate}); | |
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
define([ | |
'angular', | |
// 'domReady', | |
'ui-router', | |
'ngCookies', | |
'angularAnimate', | |
'angularTouch', | |
], function(angular) { |
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
define([ | |
'angular', | |
'domReady', | |
'app/app.core', | |
// 'ui-router', | |
// 'ngStorage', | |
// 'ngCookies', | |
// 'angularAnimate', | |
// 'angularTouch', |
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
tips:from http://jsfiddle.net/tjsteinhaus/fo3y41rn/ | |
var myControllers = angular.module( 'myControllers', [] ); | |
myControllers.controller( 'FormController', function( $scope, $http, $httpParamSerializerJQLike ) { | |
$scope.master = {}; | |
$scope.update = function( user ) { | |
$scope.master = angular.copy( user ); | |
console.log( $scope.master ); | |
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
define(['jquery', 'message'], function($, scojs_message) { | |
'use strict'; | |
/** | |
* The image upload directive | |
* @author: kehefu | |
* @version: 0.1.0, 2016-12-27 | |
*/ | |
var uploadModule = angular.module('upload', []); | |
uploadModule.directive('upload', ['$window', function($window) { |
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
problem:node-sass@1.0.1: [Windows Error ] %1 is not a valid win32 application | |
solution:npm rm node-sass | |
npm install node-sass | |
d3spis3d/generator-angular-es6-webpack: | |
https://github.com/d3spis3d/generator-angular-es6-webpack/blob/master/generators/app/templates/_webpack.config.js |
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
npm install rimraf -g | |
rimraf node_modules |
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
overflow: hidden; | |
text-overflow:ellipsis; | |
white-space: nowrap; |
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
function isNumeric( obj ) { | |
return (obj - parseFloat( obj ) + 1) >= 0; | |
}, |
OlderNewer