colorfest / angularjs Goto Github PK
View Code? Open in Web Editor NEWAngularJS tutorial for AccioCode
AngularJS tutorial for AccioCode
on your code from video 33 (https://www.youtube.com/watch?v=Ob9E1-TFUBs) , if i throttle Chrome to 2G (450kb/s), an error gets thrown from nextfilm.directive.js
TypeError: Cannot read property '0' of undefined
scope.newFilm = scope.films[0];
presumably then, this hasn't run from upcomingfilms.controller.js
$scope.films = allMovies;
is this an inherent issue to Angular? i wasn't sure why you have a 300ms timeout on functions. I assume it's related to everything running correctly in order.
is there a way to make one dependent on the other to avoid this error?
i console logged the various functions and it comes out like in this order, presumably meaning the nextfilm 300ms timeout is firing before the promise completes
MCU.directive.maincontent
MCU.directive.maincontent.link
MCU.directive:nextfilm
MCU.service:phasesService
MCU.controller:upcomingfilmsController
MCU.service:phasesService.getPhases
MCU.directive:nextfilm.link
MCU.directive.maincontent.link.timeout
MCU.directive:nextfilm.link.timeout // allMovies not set yet so errors...
TypeError: Cannot read property '0' of undefined
MCU.service:phasesService.getJson->deferred resolve
MCU.controller:upcomingfilmsController.promise.then
MCU.controller:upcomingfilmsController.allMovies
thanks
j
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.