Leon Gaban

1

votes
2

answer
940

views

Moxios - TypeError: Cannot read property 'adapter' of undefined

Trying to test axios calls and trying the moxios package. 'axios': '^0.16.2', 'moxios': '^0.4.0', Found here: https://github.com/axios/moxios Following there example, but my test errors out on the moxios.install() line: import axios from 'axios' import moxios from 'moxios' import sinon from 'sinon'...
Leon Gaban
1

votes
1

answer
26

views

SASS variables not rendering correct results in VueJS app

I have 2 SASS var colors: $red: '#F06292'; $lightPurple: '#8F6894'; Code: @import url('https://fonts.googleapis.com/css?family=Inconsolata|Oswald'); $red: '#F06292'; $lightPurple: '#8F6894'; #app { font-family: 'Inconsolata', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing:...
Leon Gaban
1

votes
2

answer
1.5k

views

Cannot PUT error in Node Express app

My get and post APIs are working, but for some reason my app.put isn't. When I hit localhost:3001/contacts/1 as a PUT in PostMan, I don't even see my simple console.log: app.put('/api/contacts:id', (req, res) => { console.log('req.params.id', req.params.id); res.json(contact); }); app.put app.put('/...
Leon Gaban
1

votes
1

answer
318

views

How to programmatically close the Material-Ui DropDownMenu

http://www.material-ui.com/#/components/dropdown-menu Due to a styling issue I had to change the order of components inside of my material-ui DropdownMenu. However now some of the buttons (renderNavLink) do not close the Dropdown after being clicked. My render: render() { return ( {this.renderMenuIt...
Leon Gaban
1

votes
1

answer
1.1k

views

Getting .then of undefined when trying to test a dispatch action function in React/Redux/Jest

component › toggleNotification actions › creates NOTIFICATION_REMOVE after successfull NOTIFICATION_ADD (error) TypeError: Cannot read property 'then' of undefined In my changePassword component 3 dispatch functions, and focusing on testing the toggleNotification. const mapDispatchToProps = disp...
Leon Gaban
1

votes
2

answer
899

views

Getting TypeError: Object(…) is not a function with when changing Routes in React

Not sure why I'm getting the following error. Uncaught TypeError: Object(...) is not a function at Redirect.componentDidUpdate (Redirect.js:42) The render method of my routeInterceptor component: render() { const { forbidden, notFound } = this.state; const { authed } = this.props; // const { locatio...
Leon Gaban
1

votes
1

answer
274

views

Webpack: size exceeds the recommended limit (244 KiB)

Here is the branch and repo in question: https://github.com/Futuratum/moon.holdings/tree/dev Hi I'm running into this problem, because I have an assets folder with a lot of images. I don't care about the size, this should be normal for modern web users. How do I ignore this error? I found this answe...
Leon Gaban
1

votes
2

answer
153

views

Jest test on typescript file syntax error: “interface is a reserved word in strict mode”

My Branch: https://github.com/Futuratum/moonholdings.io/tree/JestTests Current PR: https://github.com/Futuratum/moonholdings.io/pull/29 My Astronaut.tsx component import React from 'react'; import { moonHoldings } from '../../shared/models'; import { astronaut } from '../../styles'; const { Astronau...
Leon Gaban
0

votes
0

answer
103

views

On iOS React text/number input is stuck forcing user to enter in phone number

In my React/NextJS app, I have this simple input: Components: Search > SearchSelect > ExchangeInfo.tsx: Search.tsx //... the function: @bind handleEnterPosition(position: number) { this.setState({ position }) } SearchSelect ExchangeInfo import React from 'react' import { bind } from 'decko' import {...
Leon Gaban
1

votes
1

answer
1.6k

views

FLash: Error when trying to use setChildIndex and TweenLite to create a button rollOver effect

Hi again everyone :) So today I'm trying to basically create a simple glow effect on button rollOver. I may be over complicating things, but the way I'm going about this is by having 2 movieClips(default state and over state). First I add the default state to the stage, next I add the rollOver state...
Leon Gaban
1

votes
1

answer
217

views

Calling function in other Class not working

Hey everyone, not sure what is going on here :( Basically I have a function that is needs to tell 2 other classes to do something. It works for one of the classes: BigPlayButton, but not Background for some reason. TabMenu.as Class function Note: The function below WILL call the hitPlayCircle functi...
Leon Gaban
1

votes
2

answer
403

views

How to target span when hover over li element in jQuery

so I have a CSS fade animation on hover. Check out the 6 rectangle buttons on the homepage here: http://athenasweb.com When you hover over one of the li's in the ul. The blue area where the title of the box is animates. However in IE it just switches completely to white without the animation. So I t...
Leon Gaban
1

votes
2

answer
2.6k

views

How to change fill color of SVG on click when it's used as a background image?

http://codepen.io/leongaban/pen/EChLK So unique problem here, not sure how to target and change the fill color of my SVG when it's used as a background image. In my case here swapping the class myGreen to myGray on click. html Phone CSS #icon_phone { padding-left: 15px; height: 30px; font-family: Ar...
Leon Gaban
1

votes
1

answer
1k

views

Can't create new foundation project

so I'm following this tutorial here: http://foundation.zurb.com/learn/video-started-with-foundation.html I cd into my project folder, ruby is installed, I install bower, install foundation gem install foundation However I can't create a new foundation project. According to the site, the command is j...
Leon Gaban
1

votes
1

answer
872

views

jQuery animate background color not animating

http://jsfiddle.net/leonwho/98mD2/ HTML 1 Sync! CSS #account-setup-guide { position: relative; margin: 30px 30px 20px 20px; padding: 20px; width: auto; border: 5px solid orange; background: orange; } jQuery var animateThis = function() { console.log('run animateThis'); $('#account-setup-guide').stop...
Leon Gaban
1

votes
2

answer
250

views

Detecting when div is scrolled to does not work

I'm having trouble detecting when a certain section of the page is scrolled down to. Once I get down to a certain ID or Class, I'd like to run a couple of functions. I found this solution here, and tried this below, but the code does not activate: // Once you scroll into that div ID, this still does...
Leon Gaban
1

votes
1

answer
883

views

Can't GET JSON in wordpress php plugin

I'm testing an API I build locally with a local install of wordpress. My API path is something like: http://local.web.tt.com:8615/api/product With my Node server running it displays this in the browser when you go to that link (mongodb collections object]: [ { '_id':'54bd5fbb646174009a450001', 'prod...
Leon Gaban
1

votes
1

answer
68

views

How to place a variable inside of Directive HTML block and have it be accessed by Controller?

I have a directive that puts an HTML block onto the page. Inside that block I need there to be a variable that I can access and change, based on an ng-click function in my controller. My directive: .directive('sendModal', function () { return { restrict: 'E', template: ''+currency+'' }; }); Function...
Leon Gaban
1

votes
1

answer
652

views

How to compile JS in sub directories using Gulp?

My folder structure: dashboard > components > accounts > accounts.js, accountsDirectives.js dash > dashApp.js settings > settings.js, settingsDirectives.js etc... My function in the Gulpfile function compile_js(minify, folder) { var jsLibs = gulp.src('client/'+folder+'/_sources/js/libs/*.js'); var j...
Leon Gaban
1

votes
1

answer
3.2k

views

How to add selected attribute to ng-repeated dropdown form?

I have a form that builds out multiple widgets based on some JSON data. In part of that form is a select dropdown, and some items have different options selected by default. ie: object 1 { tag: 'products' } The select dropdown in the ng-repeat widget companies news people products ^ Here if this wa...
Leon Gaban
1

votes
1

answer
416

views

How to update item in Model array in different scopes, and have changes reflect everywhere?

I have a parent $scope and child $scope. When the child view is loaded, I make a GET call to retrieve JSON data (an array of hundreds of objects), which I then pass to the parent $scope. Now in the child view I retrieve data from the parent's model to get what I need to build widgets with ng-repeat....
Leon Gaban
1

votes
1

answer
64

views

How to close out all popovers on body click in Angular?

http://plnkr.co/edit/hqXGl47EJ0wVaEgoXk3X?p=preview I'm trying to find the best way to accomplish this. Basically there are several popovers we have in our app, for fuzzy search, additional options, help tips etc etc. When any of them are open, they need to be closeable if the user clicks anywhere e...
Leon Gaban
1

votes
1

answer
533

views

keyCode displaying incorrect code value in Angularjs

I'm working on capturing keys pressed to use with an API for fuzzy search results. Anyways I'm using this code to capture keypresses in my Markup and Directive Controller: vs.typingMainSearch = function(e) { console.log(e.keyCode); vs.searchPopoverDisplay = true; }; However when I type a I get 97, w...
Leon Gaban
1

votes
1

answer
611

views

How to prevent a ng-click event on a div in a sub controller from triggering an ng-click in the root?

http://plnkr.co/edit/gB7MtVOOHH0FBJYa6P8t?p=preview I have a parent child controller example above, in the child when a button is clicked I displays the div showPop and then will $emit an event upwards to the $rootScope. Now in the parent / $rootScope I 'hear' that event then activate another functi...
Leon Gaban
1

votes
1

answer
3.4k

views

Node error: connect ETIMEDOUT when trying to access route /setup [closed]

I'm following this tutorial guide here on Authenticate with NodeJs and JSON web tokens. I'm created my server.js, config.js, and user model. My app ran fine on localhost:3333 (my 8080 never works). Then I added the /setup route to create a user. After going to /setup the app looked like it hung for...
Leon Gaban
1

votes
1

answer
283

views

How to allow list positioned absolute, to break out of fixed element?

http://codepen.io/leongaban/pen/ZGywrV?editors=110 I have a list which items will be scrollable left and right inside of a column. However the column has a position of fixed, which is not letting my items break out of the tag-column div. Currently it looks like this: I want it to look like this: So...
Leon Gaban
1

votes
1

answer
79

views

AngularJS : Why is my ng-change not logging the actual model item, but instead the binding text?

My model is the array vh.loadedViews with 4 items. My ng-repeat on the option: ng-repeat='view in vh.loadedViews' my ng-model on the select: ng-model='view.description' However in my ng-change function vh.chooseView it's printing out the binding text and not the actual model data. Markup: Select a s...
Leon Gaban
1

votes
1

answer
566

views

How to fix this End of Expression error in the markup of my Directive?

Error: $parse:ueoe Unexpected End of Expression Looking at Chrome, this is what I see in the console: Here is a link to the Gist for an easier read. template : ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + '{{tgh.tag.tweet_percentage}}% ' + ' ' + '{{tgh.tag.quantity}} tweets ' + ' ' + '0 tweets ' + ' ' + ' '...
Leon Gaban
1

votes
1

answer
56

views

Why does my $timeout.cancel work here, but not here?

I'm having a strange problem in my Angular app. In the sidebar I have some tags with code to show a hover and hide a hover. It requires the user sit over the tag for 2 secs before the hover is shown, if the user leaves before 2 secs, the $timeout.cancel will wire in the mouseleave function and kill...
Leon Gaban
1

votes
1

answer
99

views

Can't find out where my Angular minify bug is, do config or run functions require [] syntax?

I'm trying to go line by line to figure out where the problem is, does anything here need to change? Failed to instantiate module tickertags due to: Error: [$injector:strictdi] http://errors.angularjs.org/1.4.1/$injector/strictdi?p0=f...) at Error (native) at http://localhost/static/dashboard/libs...
Leon Gaban
1

votes
1

answer
3.4k

views

How to scrollToElement using angular-scroll?

I'm using Angular Scroll and once you hit a certain page I fire a function to scroll to an id. I'm getting the following error on the code below: TypeError: $document.scrollToElement is not a function initHelp(); function initHelp() { console.log('initHelp'); $document.scrollToElement('#chart-help',...
Leon Gaban
1

votes
2

answer
388

views

How to enable a sticky menu within the Ionic framework?

I have a view where I need to implement a sticky menu inside of the Ionic framework. Looking for an Angular not jQuery solution I found ngSticky. Great library works perfect, the problem however is that it won't work inside of the Ionic directive . I asked a previous question about it here, and then...
Leon Gaban
1

votes
1

answer
1k

views

Why is my EventListener getting called twice?

In my Angular mobile app (Ionic framework), I'm setting up my infinite scroll functions. It's basically the same code as the dashboard version yet my scrollTagsPanel gets called twice. getTagsFactory Inside my getTagsFactory I do an API call and retrieve back tag objects, then I pass the tags into t...
Leon Gaban
1

votes
1

answer
944

views

How to force the nvd3 chart timespan to stretch the width of the chart?

http://plnkr.co/edit/ymrqIOGTBqF6TVMTvC4T?p=preview I have the latest d3 and nvd3 libraries in the plnkr above. When you first view the chart, you will notice that all the timespan ticks 09:00, 08:30, 08:00 etc are all squished/overlaid on top of each other on the left xAxis. Now the timespans will...
Leon Gaban
1

votes
1

answer
1.1k

views

Gulp watch failing with Spawn EACCES error

Any idea what is causing this error? My Gulp Watch statement: gulp.task('watch', function() { gulp.watch('app/**/**/*.html', ['html-templates']).on('change', function(file) { gutil.log(gutil.colors.yellow.bold('HTML updated' + ' (' + file.path + ')')); }); gulp.watch('app/assets/imgs/*.svg').on('cha...
Leon Gaban
1

votes
1

answer
385

views

Price line disappears in HighChart

I'm using HighCharts and the Angular highcharts-ng directive. And most actions I take have a high likely hood of causing the price line vanish, or rather actually, not display. Resizing the browser window, thus resizing chart (line vanishes 90%) Changing the timespan (line vanishes about 20% of the...
Leon Gaban
1

votes
1

answer
21

views

Error when testing Factory toBeDefined

describe('Tickers Factory:', function() { var tickersFactory, tickerContainer, tickerType, chartIsReady; beforeEach(function() { module('tickersFactory'); }); beforeEach(inject(function(_tickersFactory_) { tickersFactory = _tickersFactory_; })); it('tickersFactory should be defined', function() { ex...
Leon Gaban
1

votes
1

answer
344

views

How to get chart min and max values after Drag zooming in highChart chart?

http://jsfiddle.net/leongaban/0zuxtdcg/ I could not find a 'Drag zoom' type event in the HighChart docs that would tell me that the user has finished zooming into a specific range on the chart, then give me the new min and max values. $(function () { $.getJSON('https://www.highcharts.com/samples/dat...
Leon Gaban
1

votes
1

answer
284

views

HighChart: How to get exact point / timestamp from plotBands click

I clicked in the Yellow PlotBands area while Sunday, Jan 3, 2010 was highlighted. I want to be able to grab that date in the click event below. http://jsfiddle.net/leongaban/a6hqx5eb/ Below you can see the click function with a simple log of the event $(function () { var $report = $('#report'); $('#...
Leon Gaban
1

votes
1

answer
138

views

How to change HighChart xAxis timeline to match local time and not UTC?

Note above in my screenshot, the tooltip is displaying the correct local time. However the xAxis timeline is showing 12:00pm UTC time. I have global:useUTC set false in 2 places: In my chartConfig: vm.config = { global: { useUTC : false }, // { Highcharts.setOptions({ global: { useUTC: false }, //
Leon Gaban

View additional