• Home
  • Blogs
    • General Technology All
      General

      Struggles and Solutions for University Transfer in California

      July 10, 2018July 13, 2018

      General

      Redesigned Website – Version 2 Released!

      May 24, 2018June 5, 2018

      Technology

      A Usual Day of Memory Leak Analysis With Gotcha

      January 30, 2019January 30, 2019

      Technology

      Memory Leak from ECharts Occurs If Not Properly…

      December 2, 2018December 5, 2018

      Technology

      Circular Audio Wave - JS Library for Audio Visualization in…

      July 14, 2018December 5, 2018

      Technology

      Struggles and Solutions for University Transfer in California

      July 10, 2018July 13, 2018

      Blog

      A Usual Day of Memory Leak Analysis With Gotcha

      January 30, 2019January 30, 2019

      Blog

      Memory Leak from ECharts Occurs If Not Properly…

      December 2, 2018December 5, 2018

      Blog

      Circular Audio Wave - JS Library for Audio Visualization in…

      July 14, 2018December 5, 2018

      Blog

      Struggles and Solutions for University Transfer in California

      July 10, 2018July 13, 2018

  • Places
  • Mini-Games
  • Chatroom
  • Old Website Versions
    • V1 SPA (Last Modified in 2016)

Kelvin Au | A Passionate Software Developer

Try to Catch 10 Kelvins
No. of Kelvins Caught: 0
  • Home
  • Blogs
    • General Technology All
      General

      Struggles and Solutions for University Transfer in California

      July 10, 2018July 13, 2018

      General

      Redesigned Website – Version 2 Released!

      May 24, 2018June 5, 2018

      Technology

      A Usual Day of Memory Leak Analysis With Gotcha

      January 30, 2019January 30, 2019

      Technology

      Memory Leak from ECharts Occurs If Not Properly…

      December 2, 2018December 5, 2018

      Technology

      Circular Audio Wave - JS Library for Audio Visualization in…

      July 14, 2018December 5, 2018

      Technology

      Struggles and Solutions for University Transfer in California

      July 10, 2018July 13, 2018

      Blog

      A Usual Day of Memory Leak Analysis With Gotcha

      January 30, 2019January 30, 2019

      Blog

      Memory Leak from ECharts Occurs If Not Properly…

      December 2, 2018December 5, 2018

      Blog

      Circular Audio Wave - JS Library for Audio Visualization in…

      July 14, 2018December 5, 2018

      Blog

      Struggles and Solutions for University Transfer in California

      July 10, 2018July 13, 2018

  • Places
  • Mini-Games
  • Chatroom
  • Old Website Versions
    • V1 SPA (Last Modified in 2016)
Monthly Archives

June 2018

angularjs-jquery
Technology

Issue of AngularJS with jQuery – ngRepeat on Object with Wrap Function

by Kelvin Au June 5, 2018June 20, 2018

Recently I experienced a weird behavior of an old AngularJS directive which simply added a wrapper DOM using jQuery wrap function together with ngRepeat. Of course there are many better ways to provide the same functionality without use of jQuery, but this is not the focus of this blog. I want to show the reason behind why jQuery is not recommended to be used with AngularJS for DOM manipulation. The demo is set up on JSFiddle here.  The directive just calls ‘elem.wrap(‘<div class=”wrapper”></div>’)’ to wrap the DOM, which will make the text black; otherwise it will be in red. Then an element using this directive is rendered with ngRepeat on an object to show two texts. A button “Reset allTexts” is used to clone this object and reassign itself. Sounds easy enough and there shouldn’t be any changes after resetting the object? Try it. As you can see, the DOM structure is changed and the texts are now not inside the wrapper DOMs. What happened?

Continue Reading
June 5, 2018June 20, 2018

About Me

About Me

A Passionate Software Developer

I love writing codes to realize my random ideas that can make lives better with just a computer and my determined attitude.

Recent Posts

  • A Usual Day of Memory Leak Analysis With Gotcha

    January 30, 2019
  • Memory Leak from ECharts Occurs If Not Properly Disposed

    December 2, 2018
  • Circular Audio Wave - JS Library for Audio Visualization in Circular Waveform

    July 14, 2018
  • Struggles and Solutions for University Transfer in California

    July 10, 2018
  • Issue of AngularJS with jQuery – ngRepeat on Object with Wrap Function

    June 5, 2018

Archives

  • January 2019
  • December 2018
  • July 2018
  • June 2018
  • May 2018

Categories

  • Blog (2)
  • General (2)
  • Technology (5)

My Other Interests

SingingSupporting Local Schools in MexicoTradingGaming

My Motto

Stay Young Stay Positive Stay Happy
  • Github
  • Linkedin

Kelvin Au © 2014-2023