Here's a new screencast I recorded on Advanced Directives with Angular JS. Enjoy! :) #angularjs #screencast
@ParsiMusik9 жыл бұрын
+David Mosher very useful thanks :)
@DavidMosher7 жыл бұрын
I've started up again Jesse, I just published Part 2; look for more to come in the near future as well :) kzbin.info/www/bejne/aquqaYacqsiIsMk
@keanubaker74213 жыл бұрын
I realize it's quite randomly asking but does anybody know a good site to stream new movies online ?
@lucafelipe23473 жыл бұрын
@Keanu Baker I use Flixzone. You can find it on google :)
@fabiantucker79923 жыл бұрын
@Keanu Baker I use FlixZone. You can find it on google :)
@gabrielbarroso41188 жыл бұрын
Thank you so much! I'm an experienced Javascript developer, just wanted to know what we can do with Angular on a advanced level and this was great.
@Lachezariii8 жыл бұрын
Dude, this is the best angular directives tutorial I''ve ever seen BY FAR!! Thanks for that! Take care
@KevinCarbonaro9 жыл бұрын
Although I am still way far from understanding all of what you mentioned, your tutorial gave me a lot of practical pointers of what I should learn next to level up my custom directives. Thanks!
@bebopwestern9 жыл бұрын
One of the best Angular videos out there. Great job!
@TechWarriorz9 жыл бұрын
You sir are a beast, this is THE BEST video based on Directives that I have seen.
@CienciaFiccionPeru9 жыл бұрын
Incredible tutorial of advance directives! Thanks so much for your collaboration :)
@GiteshPurbia9 жыл бұрын
Nice tutorial. Now i have clear many doubts about directives.Thanks
@srik90616 жыл бұрын
This was a very illuminating talk. Thank you very much
@DavidMosher6 жыл бұрын
Glad it was helpful Srikanth! :)
@symmetri9 жыл бұрын
Great screencast! Thanks for taking the time, this is a tricky subject.
@billlock97668 жыл бұрын
Thank you for taking the time to do it right; great information!
@jaykan1119 жыл бұрын
Hey David, great tutorials on leveraging AngularJS directives controller for delegating API for child directives. Quick correction on controller($scope) vs. link (scope), the "$" $scope in controller actually indicates that the scope value is being injected into the current context, but not all references to scope are based on the dependency injection (For instance, in $watch, link, and cloning functions) scope is always being passed as a positional argument, regardless of its name. From a functional perspective, it works the same way. Anyways great tutorials :)
@DavidMosher9 жыл бұрын
Great point Jay Kan, thanks for clearing that up. I don't recall my exact wording but I think they are still the same scope instance in the end; the difference, as you've pointed out, is in how they get there (DI vs Positional Hardcoded Argument). :)
@jaykan1119 жыл бұрын
***** Do you happen to cover how to toggle inner editor directive in your other tutorials or part II?
@DomViking9 жыл бұрын
One of the better tutorials on youtube, thanks for making this video!
@ChyngyzArystanuulu9 жыл бұрын
Thanks for the great tutorial David, it is very useful. Waiting for the second part.
@adamkruppa60839 жыл бұрын
Thank you very much David! Awesome video, please carry on, love your works and the way you give advice how to solve the problem, how to think about it and not just code.
@DavidMosher9 жыл бұрын
You're welcome Ádám Kruppa, I'm glad you enjoyed the screencast :)
@ArkinSturmdranger8 жыл бұрын
Very awesome guide, thanks. Hoping to write my own DSL using some of these concepts/ techniques.
@ArkinSturmdranger8 жыл бұрын
It's kinda another way of saying "how do we craft an Absract Syntax Tree (AST)?", albeit we're still stuck in in v1 Angular, whereas the rest of the world's leaving us behind in v2 I suppose. heh, oh well, can't win em all.
@arsal1239 жыл бұрын
A great custom directive learning. Love it.
@lok_esh9 жыл бұрын
Awesome. I really like the way you have explained the concepts.. great tutorial :)
@gauravkakkar878 жыл бұрын
Thanks for creating this tutorial. Very helpful and informative!
@ShrinivasanNeelamegam8 жыл бұрын
Great video David. I couldnt find any video in youtube that explains advanced directives this well. Could you post the link to the advanced directives part 2 which you mention in this video?
@DavidMosher7 жыл бұрын
Hi Shrinivasan, I just published Part 2 today; a little late but better late than never right? ;) kzbin.info/www/bejne/aquqaYacqsiIsMk
@brennenawana98268 жыл бұрын
Awesome screencast! Thank you. Has the second video been published yet? I can't seem to find it.
@DavidMosher7 жыл бұрын
Hi Brennen, I may be late to the party but I just published Part 2; check it out and let me know what you think :) kzbin.info/www/bejne/aquqaYacqsiIsMk
@abrieljohngabriel86867 жыл бұрын
Thanks David!. Very comprehensive but very clear as well. :)
@DavidMosher7 жыл бұрын
Glad it was helpful Abriel :)
@KalpeshPanchal7 жыл бұрын
Thanks David, Amazing screencast. We can achieve the desired functionality without jQuery as angular comes with jQueryLite.
@pimisi9 жыл бұрын
Great tutorial. Really insightful. Quick question... How did you deal with the bug of the repetition of the editor rows?
@myyellowdog8 жыл бұрын
Wow! Great video. I just learned more about directives than I learned from reading "AngularJS Up and Running," which is actually a pretty great book, so no small feat! I also loved how you showed us the techniques for building up one step at a time and hunting bugs when the code wasn't perfect-an inevitable aspect of the job. The $0 trick alone will undoubtedly save me tons of time in the future. Quick question: why did you have to use compile for the editor initializer bit? (This might be obvious to me as I work through the code myself in the morning, so please forgive this possibly premature question.) Thank you so much for sharing your knowledge. You da man! I am searching now for your other videos.
@Awesomo40009 жыл бұрын
@37:25 A comment can be used for a directive (exampleDirective), if the restrict is set to M. So it seems logical that a comment is seen as an element. Not sure why it exists however.
@chenrvn9 жыл бұрын
First of all thanks for sharing. It great screen cast, love your learning way. Second, regard to pre and post link it work fine/as excpected because the column grid is the leaf so it dosnt care for the order. If u will put pre on directive parent such grid-columns so than he will run the linkin function first. U can use also the order number of the directive but u need to put extra care regard this method :-) (u know that). Once again thanks a lot for this video men.
@DavidMosher9 жыл бұрын
Ah yes, thanks for that Chen Reuven, I forgot you have to use the pre/post on the parent element to determine child linking order :D
@chenrvn9 жыл бұрын
***** one more thing. i put console.log to see the function execution ordewr and i see something strange. this is the output: gridScreen controller... gridColumns controller... gridColumn link... gridColumns link... gridScreen link... grid controller... withInlineEditor link... editorInitializer controller... editorInitializer link... editorInitializer controller... editorInitializer link... editorInitializer controller... editorInitializer link... How can be that gridScreen link is call before is child? moreover how can be that grid controller is called after the link function of the grid? Thanks:) - i have image but i cannot upload it here there is no such function here...
@AkshayKadu8 жыл бұрын
Nicely explained. Thanks for sharing.
@aleixsuau8679 жыл бұрын
Great video David, thank you very much!
@alexfrolov75468 жыл бұрын
Great tutorial. David, why did you stop publishing videos ?
@DavidMosher7 жыл бұрын
Hi Alex, I took a bit of a break but I intend to start publishing again. I started today by pushing Part 2 of this series! kzbin.info/www/bejne/aquqaYacqsiIsMk
@alexfrolov75467 жыл бұрын
\0/
@JorgeCorradi8 жыл бұрын
Man, I can not thank you enough... You rock!!
@ParthDaveIn8 жыл бұрын
Very nice explanation. But I could not find Part 2. Can you please post a link?
@DavidMosher7 жыл бұрын
Hi Parth, Part 2 just got published today :) kzbin.info/www/bejne/aquqaYacqsiIsMk
@KevinCarbonaro9 жыл бұрын
I am now trying to create a sortable attribute however I cannot find a way to bind a click function to the column header yet. This is my directive so far (does not work) .directive('sortable', ['$compile', function($compile) { return { restrict: 'A', compile: function(el) { el.removeAttr('sortable'); el.attr('ng-click', function() { console.log('clicked'); }); var fn = $compile(el); return function(scope){ fn(scope); }; } } }])
@zoranvulanovic37808 жыл бұрын
Great tutorial. Clear and understandable for everyone who know basic of angular. I think your pre and post did not work because is living in link function. Pre and post must live compile function i guess.
@sridharkorrapati62329 жыл бұрын
Need help in creating angular directive using JQXTreeGrid widget. With column and pagination
@antonzizic34839 жыл бұрын
very usefull vid to help understanding directives. thank you !!!
@ranostaj-dev9 жыл бұрын
how you decide which functionality goes into Controller and which into Link function?
@petestorey25579 жыл бұрын
jan ranostaj The link function is called when the directive is first used in the view and can initialise/edit the dom elements and attributes, set up/access scoped variables and can access controllers. The controller is used to hold all of your other variables and functions that are accessible via expressions in your views like in simpler angular applications or templates specified in templateUrl.
@ehguacho20089 жыл бұрын
amazing bro, i've learned a lot thru this vid. thanks a lot (:
@sriharsha11508 жыл бұрын
How did the grid-screen and gridScreen get mapped?
@Suamere8 жыл бұрын
That is just a convention in AngularJS. Wherever there is a Capital Letter between words, a dash is added instead. soThisVariableHere becomes so-this-variable-here. Don't need to worry about how, that's the point of Conventions.
@MrNSundar9 жыл бұрын
hi nice tutorial..$(editor).insertAfter(element.parents("tr")) this line is giving me Cannot read property 'ownerDocument' of undefined..
@adamkruppa60839 жыл бұрын
While doing the extra credit, what u mentioned at the end of the vid, I ran to a problem, probably it's easy, but if i trigger the arrows, and I want the other arrows to auto close if it was open, then, how can I do that? Tried with ng-blur too but couldn't broadcast 2 events(ng-click didn't work then) and don't know if it is possible or it is a bad pattern to reach attributes of sibling directives. So can you give me a hint, how to to that? If this is on topic and you have time for this.
@DavidMosher9 жыл бұрын
Hey Ádám Kruppa I Would love to see a github pull request or gist with some of your code, easier to visualize that way and perhaps we could come up with a solution together? :)
@adamkruppa60839 жыл бұрын
***** Solved the problem, just needed to rethink it, started to learn Angular about a month ago, so still have questions in my head made a pull request. And I am really interested in your opinion, because I assume you would have done it differently and better. :)
@AshkonHemmati8 жыл бұрын
You sir, are an absolute beast!
@jamesbarrow8 жыл бұрын
Thank you so much for this, it was a great tutorial, I learned a lot! High five!
@KevinCarbonaro9 жыл бұрын
My json rows have sub objects such as 'Employee.DisplayName', so naturally I am adding that as a column field. However it does not seem to be able to render anything with {{row[column.field]}}. When I remove the '.DisplayName' I do get the following data returned as an Employee row: {"Department":"Management","DisplayName":"Jackie"} Maybe someone out there can point me to why it is happening.
@KevinCarbonaro9 жыл бұрын
I managed to work around it by extracting only the data needed by the columns field dynamically into the rows array.
@HolyShoyo9 жыл бұрын
Thanks for tutorial. Great example.
@VishalKumarTech9 жыл бұрын
Very helpful. Thank you so much!
@gaurav631059 жыл бұрын
i superliked this,thanks man ,you were super helpful
@samehghanmi44878 жыл бұрын
Thank you David. Subscribed.
@niculistana72278 жыл бұрын
Very well done! Thank you.
@ratnesh11049 жыл бұрын
1 correction regarding the order of pre-link and post-link phase. Overall logic is as: 1. Compile method is invoked in the way the tree is traversed. 2. During linking phase, the traversing happens in the same way the tree traversing do with following algorithm: i) If element has pre-link, invoke it. ii) If it has child element, and post-link method. Go down the tree without invoking post-link. iii) If the element doesn't have any child node/element, and has post-link method then invoke post-link. So any element without child and having both pre and post linking method get executed at the same time as: pre-link->post-link, as it is "gridColumn" in your case. iv) Once child linking method gets invoked, go up the tree, and invoke post method of the parent.
@nadavmor48414 жыл бұрын
web developer from the future: wow, i don't miss those days...
@DavidMosher4 жыл бұрын
nadav mor 🤣 ain’t that the truth!
@codrinf8 жыл бұрын
great tutorial!
@sijimathew99829 жыл бұрын
thank you sir.
@valikonen7 жыл бұрын
Very nice example, but now I understand why React is so popular, is much easier, much clean...
@richardlucas86668 жыл бұрын
It would have been helpful for you to show the desired end result before you jumped into writing the code
@iVish9 жыл бұрын
Nice post
@vyacheslavzgordan67258 жыл бұрын
Thank you!
@mendykatz91998 жыл бұрын
part II pleaseeeeeeeeeee
@DavidMosher7 жыл бұрын
Hi Mendy, I just finished publishing Part 2! Check it out and let me know what you think :) kzbin.info/www/bejne/aquqaYacqsiIsMk