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 () { | |
'use strict'; | |
angular.module('app').controller('plansController', plansController); | |
plansController.$inject = ['$rootScope', '$scope', '$http', '$q', '$document', 'appConstants', '$timeout', '$state', '$modal', '$stateParams', 'uiGridConstants', 'productionPlansService', 'localStorageService']; | |
function plansController($rootScope, $scope, $http, $q, $document, appConstants, $timeout, $state, $modal, $stateParams, uiGridConstants, productionPlansService, localStorageService) { | |
$document[0].title = $state.current.title; | |
var vm = this; | |
vm.appConstants = appConstants; |
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
require('dotenv').config(); | |
var path = require("path"); | |
var webpack = require("webpack"); | |
var stringify = require('stringify-object-values'); | |
var PROD = JSON.parse(process.env.PROD_ENV || '0'); | |
module.exports = { | |
entry: './src/app/app.js', | |
output: { | |
path: __dirname + '/build/', |
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
//UI Component | |
<topbar-menu is-valet-online="$ctrl.isValetOnline" change-status-func="$ctrl.toggleVisibilityStatus()"></topbar-menu> | |
// JS Code | |
'use strict'; | |
class ValetDashboardController { | |
/*@ngInject*/ | |
constructor($q, $scope, $cookies , Pusher) { |
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
class SlotService { | |
/*@ngInject*/ | |
constructor($http,CONFIG_CONSTANTS,$q, AuthService) { | |
this.API_URL = CONFIG_CONSTANTS.API_URL; | |
this.$http = $http; | |
this.$q = $q; | |
this.api_token = AuthService.api_token; | |
} | |
getSlotList(floorId) { |
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
require('dotenv').config(); | |
var path = require("path"); | |
var webpack = require("webpack"); | |
var stringify = require('stringify-object-values'); | |
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin'); | |
var PROD = JSON.parse(process.env.PROD_ENV || '1'); | |
module.exports = { | |
entry: './src/app/app.js', | |
output: { |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"font_size": 9, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"line_padding_bottom": 5, | |
"line_padding_top": 5, | |
"rulers": |
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
Basics | |
1.Constants for ActionTypes | |
2.Actions based on actiontype | |
3.Reducer depends on constant | |
4.Store from redux | |
5.Views with Provider redux | |
6.connect state to props with connect in react-redux | |
Async HTTP Request using Redux | |
1.crete an action and import `axios` or other HTTP Library. Actions must have request, success and error status |
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 arr = ["aaa","bbb"]; | |
console.time('native'); | |
for (var i=0; i < arr.length; i++) { | |
console.log(arr[i]); | |
}; | |
console.timeEnd('native'); | |
console.time('jquery'); | |
$.each(arr, function(i,v){ |
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 likeButton = document.querySelectorAll('._48-k'); | |
for(var i=0 in likeButton) { | |
// trigger the anchor element | |
likeButton[i].click(); | |
} |
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
// target the every anchor element (friend in friendlist) | |
var elem = document.querySelectorAll("a._55ln"); | |
for(var i=0 in elem) { | |
// trigger the anchor element | |
elem[i].click(); | |
//target the text area | |
var textArea = document.getElementsByClassName("uiTextareaAutogrow _552m"); | |
var chatBox = textArea[0]; | |
// message value here | |
chatBox.value = "Hello, This is a test chat from console please dont reply"; |
NewerOlder