This video expands on "Part 1" of the component video tutorial by adding the ability to toggle between an "edit mode" and a "preview mode" in your Markdown component.
Key Takeaways
How to use "transclusion"
When to use a "link function" and when to use a "compile function"
How to access elements inside of your component
The importance of isolate scope
Why you should always use a namespace with your components
Great post. I have an issue though. Why is it that when I wrap the element with a div and apply ng-repeat on top of the div, the two textareas still show up. But, when I double-click on any of the text-areas, only the word Preview is shown.
Is there something about custom directives that doesn't play well with ng-repeat?
Thanks for the tutorial!
ReplyDeleteVital infos in here, maybe you get the angular crew to share this on their docs.
That would be awesome :)
P.S: first! ;)
Great post. I have an issue though. Why is it that when I wrap the element with a div and apply ng-repeat on top of the div, the two textareas still show up. But, when I double-click on any of the text-areas, only the word Preview is shown.
ReplyDeleteIs there something about custom directives that doesn't play well with ng-repeat?