[{"data":1,"prerenderedAt":5566},["Reactive",2],{"series-featured":3,"series-all":19,"articles-latest":21,"articles-all":339},[4],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"id":9,"name":10,"description":11,"thumbnail":12,"featured":13,"_id":14,"_type":15,"title":16,"_source":17,"_file":18,"_extension":15},"/series/data_science_r","series",false,"","data_science_r","Data Science With R","Intro to Data Science with R","/series/data_science_r.png",true,"content:series:data_science_r.json","json","DataScienceR","content","series/data_science_r.json",[20],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"id":9,"name":10,"description":11,"thumbnail":12,"featured":13,"_id":14,"_type":15,"title":16,"_source":17,"_file":18,"_extension":15},[22,322],{"_path":23,"_dir":24,"_draft":7,"_partial":7,"_locale":8,"title":25,"description":26,"published":27,"readTime":28,"slug":29,"seriesId":9,"seriesOrder":30,"body":31,"_type":318,"_id":319,"_source":17,"_file":320,"_extension":321},"/articles/data-science-r-setup","articles","Setting up the working machine","Setup working environment for the series data science with R","2025/09/12",5,"data-science-r-setup",2,{"type":32,"children":33,"toc":307},"root",[34,42,49,56,138,144,204,210,264,270,275,289,295,301],{"type":35,"tag":36,"props":37,"children":38},"element","p",{},[39],{"type":40,"value":41},"text","This series",{"type":35,"tag":43,"props":44,"children":46},"h2",{"id":45},"installing-r",[47],{"type":40,"value":48},"Installing R",{"type":35,"tag":50,"props":51,"children":53},"h3",{"id":52},"windows",[54],{"type":40,"value":55},"Windows",{"type":35,"tag":57,"props":58,"children":59},"ol",{},[60,77,102,126],{"type":35,"tag":61,"props":62,"children":63},"li",{},[64,66,75],{"type":40,"value":65},"Go to the ",{"type":35,"tag":67,"props":68,"children":72},"a",{"href":69,"rel":70},"https://cran.r-project.org/",[71],"nofollow",[73],{"type":40,"value":74},"CRAN website",{"type":40,"value":76},".",{"type":35,"tag":61,"props":78,"children":79},{},[80,82,88,90,95,96,101],{"type":40,"value":81},"Click ",{"type":35,"tag":83,"props":84,"children":85},"strong",{},[86],{"type":40,"value":87},"Download R for Windows",{"type":40,"value":89}," → ",{"type":35,"tag":83,"props":91,"children":92},{},[93],{"type":40,"value":94},"base",{"type":40,"value":89},{"type":35,"tag":83,"props":97,"children":98},{},[99],{"type":40,"value":100},"install R for the first time",{"type":40,"value":76},{"type":35,"tag":61,"props":103,"children":104},{},[105,107],{"type":40,"value":106},"Run the installer and follow the setup wizard:\n",{"type":35,"tag":108,"props":109,"children":110},"ul",{},[111,116,121],{"type":35,"tag":61,"props":112,"children":113},{},[114],{"type":40,"value":115},"Choose installation directory (default is fine).",{"type":35,"tag":61,"props":117,"children":118},{},[119],{"type":40,"value":120},"Select components (default is fine).",{"type":35,"tag":61,"props":122,"children":123},{},[124],{"type":40,"value":125},"Pick language and shortcuts.",{"type":35,"tag":61,"props":127,"children":128},{},[129,131,136],{"type":40,"value":130},"Once installed, open ",{"type":35,"tag":83,"props":132,"children":133},{},[134],{"type":40,"value":135},"R",{"type":40,"value":137}," from the Start Menu or search for “R”.",{"type":35,"tag":50,"props":139,"children":141},{"id":140},"macos",[142],{"type":40,"value":143},"macOS",{"type":35,"tag":57,"props":145,"children":146},{},[147,157,167,181,193],{"type":35,"tag":61,"props":148,"children":149},{},[150,151,156],{"type":40,"value":65},{"type":35,"tag":67,"props":152,"children":154},{"href":69,"rel":153},[71],[155],{"type":40,"value":74},{"type":40,"value":76},{"type":35,"tag":61,"props":158,"children":159},{},[160,161,166],{"type":40,"value":81},{"type":35,"tag":83,"props":162,"children":163},{},[164],{"type":40,"value":165},"Download R for macOS",{"type":40,"value":76},{"type":35,"tag":61,"props":168,"children":169},{},[170,172,179],{"type":40,"value":171},"Download the ",{"type":35,"tag":173,"props":174,"children":176},"code",{"className":175},[],[177],{"type":40,"value":178},".pkg",{"type":40,"value":180}," file for the latest release.",{"type":35,"tag":61,"props":182,"children":183},{},[184,186,191],{"type":40,"value":185},"Double-click the ",{"type":35,"tag":173,"props":187,"children":189},{"className":188},[],[190],{"type":40,"value":178},{"type":40,"value":192}," file and follow the installer instructions.",{"type":35,"tag":61,"props":194,"children":195},{},[196,198,202],{"type":40,"value":197},"After installation, open ",{"type":35,"tag":83,"props":199,"children":200},{},[201],{"type":40,"value":135},{"type":40,"value":203}," from Launchpad or Finder → Applications.",{"type":35,"tag":50,"props":205,"children":207},{"id":206},"linux-ubuntu-debian",[208],{"type":40,"value":209},"Linux - Ubuntu / Debian",{"type":35,"tag":211,"props":212,"children":216},"pre",{"className":213,"code":214,"language":215,"meta":8,"style":8},"language-shell shiki shiki-themes night-owl","sudo apt update\nsudo apt install r-base\n","shell",[217],{"type":35,"tag":173,"props":218,"children":219},{"__ignoreMap":8},[220,243],{"type":35,"tag":221,"props":222,"children":225},"span",{"class":223,"line":224},"line",1,[226,232,238],{"type":35,"tag":221,"props":227,"children":229},{"style":228},"--shiki-default:#82AAFF;--shiki-default-font-style:italic",[230],{"type":40,"value":231},"sudo",{"type":35,"tag":221,"props":233,"children":235},{"style":234},"--shiki-default:#ECC48D",[236],{"type":40,"value":237}," apt",{"type":35,"tag":221,"props":239,"children":240},{"style":234},[241],{"type":40,"value":242}," update\n",{"type":35,"tag":221,"props":244,"children":245},{"class":223,"line":30},[246,250,254,259],{"type":35,"tag":221,"props":247,"children":248},{"style":228},[249],{"type":40,"value":231},{"type":35,"tag":221,"props":251,"children":252},{"style":234},[253],{"type":40,"value":237},{"type":35,"tag":221,"props":255,"children":256},{"style":234},[257],{"type":40,"value":258}," install",{"type":35,"tag":221,"props":260,"children":261},{"style":234},[262],{"type":40,"value":263}," r-base\n",{"type":35,"tag":50,"props":265,"children":267},{"id":266},"verify-installation",[268],{"type":40,"value":269},"Verify Installation",{"type":35,"tag":36,"props":271,"children":272},{},[273],{"type":40,"value":274},"To check that R is installed correctly, open a R console and run:",{"type":35,"tag":211,"props":276,"children":278},{"className":213,"code":277,"language":215,"meta":8,"style":8},"version\n",[279],{"type":35,"tag":173,"props":280,"children":281},{"__ignoreMap":8},[282],{"type":35,"tag":221,"props":283,"children":284},{"class":223,"line":224},[285],{"type":35,"tag":221,"props":286,"children":287},{"style":228},[288],{"type":40,"value":277},{"type":35,"tag":43,"props":290,"children":292},{"id":291},"installing-and-configuring-your-preferred-ide",[293],{"type":40,"value":294},"Installing and configuring your preferred IDE",{"type":35,"tag":43,"props":296,"children":298},{"id":297},"installing-base-packages",[299],{"type":40,"value":300},"Installing base packages",{"type":35,"tag":302,"props":303,"children":304},"style",{},[305],{"type":40,"value":306},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":8,"searchDepth":30,"depth":30,"links":308},[309,316,317],{"id":45,"depth":30,"text":48,"children":310},[311,313,314,315],{"id":52,"depth":312,"text":55},3,{"id":140,"depth":312,"text":143},{"id":206,"depth":312,"text":209},{"id":266,"depth":312,"text":269},{"id":291,"depth":30,"text":294},{"id":297,"depth":30,"text":300},"markdown","content:articles:data-science-r-setup.md","articles/data-science-r-setup.md","md",{"_path":323,"_dir":24,"_draft":7,"_partial":7,"_locale":8,"title":324,"description":325,"published":326,"readTime":28,"slug":327,"seriesId":9,"seriesOrder":224,"body":328,"_type":318,"_id":337,"_source":17,"_file":338,"_extension":321},"/articles/data-science-r-intro","Introduction to Data Science with R","Intro to data science with R","2025/09/11","data-science-r-intro",{"type":32,"children":329,"toc":335},[330],{"type":35,"tag":36,"props":331,"children":332},{},[333],{"type":40,"value":334},"Intro to data science with r",{"title":8,"searchDepth":30,"depth":30,"links":336},[],"content:articles:data-science-r-intro.md","articles/data-science-r-intro.md",[340,557,566,900],{"_path":23,"_dir":24,"_draft":7,"_partial":7,"_locale":8,"title":25,"description":26,"published":27,"readTime":28,"slug":29,"seriesId":9,"seriesOrder":30,"body":341,"_type":318,"_id":319,"_source":17,"_file":320,"_extension":321},{"type":32,"children":342,"toc":547},[343,347,351,355,415,419,470,474,514,518,522,535,539,543],{"type":35,"tag":36,"props":344,"children":345},{},[346],{"type":40,"value":41},{"type":35,"tag":43,"props":348,"children":349},{"id":45},[350],{"type":40,"value":48},{"type":35,"tag":50,"props":352,"children":353},{"id":52},[354],{"type":40,"value":55},{"type":35,"tag":57,"props":356,"children":357},{},[358,368,387,406],{"type":35,"tag":61,"props":359,"children":360},{},[361,362,367],{"type":40,"value":65},{"type":35,"tag":67,"props":363,"children":365},{"href":69,"rel":364},[71],[366],{"type":40,"value":74},{"type":40,"value":76},{"type":35,"tag":61,"props":369,"children":370},{},[371,372,376,377,381,382,386],{"type":40,"value":81},{"type":35,"tag":83,"props":373,"children":374},{},[375],{"type":40,"value":87},{"type":40,"value":89},{"type":35,"tag":83,"props":378,"children":379},{},[380],{"type":40,"value":94},{"type":40,"value":89},{"type":35,"tag":83,"props":383,"children":384},{},[385],{"type":40,"value":100},{"type":40,"value":76},{"type":35,"tag":61,"props":388,"children":389},{},[390,391],{"type":40,"value":106},{"type":35,"tag":108,"props":392,"children":393},{},[394,398,402],{"type":35,"tag":61,"props":395,"children":396},{},[397],{"type":40,"value":115},{"type":35,"tag":61,"props":399,"children":400},{},[401],{"type":40,"value":120},{"type":35,"tag":61,"props":403,"children":404},{},[405],{"type":40,"value":125},{"type":35,"tag":61,"props":407,"children":408},{},[409,410,414],{"type":40,"value":130},{"type":35,"tag":83,"props":411,"children":412},{},[413],{"type":40,"value":135},{"type":40,"value":137},{"type":35,"tag":50,"props":416,"children":417},{"id":140},[418],{"type":40,"value":143},{"type":35,"tag":57,"props":420,"children":421},{},[422,432,441,451,461],{"type":35,"tag":61,"props":423,"children":424},{},[425,426,431],{"type":40,"value":65},{"type":35,"tag":67,"props":427,"children":429},{"href":69,"rel":428},[71],[430],{"type":40,"value":74},{"type":40,"value":76},{"type":35,"tag":61,"props":433,"children":434},{},[435,436,440],{"type":40,"value":81},{"type":35,"tag":83,"props":437,"children":438},{},[439],{"type":40,"value":165},{"type":40,"value":76},{"type":35,"tag":61,"props":442,"children":443},{},[444,445,450],{"type":40,"value":171},{"type":35,"tag":173,"props":446,"children":448},{"className":447},[],[449],{"type":40,"value":178},{"type":40,"value":180},{"type":35,"tag":61,"props":452,"children":453},{},[454,455,460],{"type":40,"value":185},{"type":35,"tag":173,"props":456,"children":458},{"className":457},[],[459],{"type":40,"value":178},{"type":40,"value":192},{"type":35,"tag":61,"props":462,"children":463},{},[464,465,469],{"type":40,"value":197},{"type":35,"tag":83,"props":466,"children":467},{},[468],{"type":40,"value":135},{"type":40,"value":203},{"type":35,"tag":50,"props":471,"children":472},{"id":206},[473],{"type":40,"value":209},{"type":35,"tag":211,"props":475,"children":476},{"className":213,"code":214,"language":215,"meta":8,"style":8},[477],{"type":35,"tag":173,"props":478,"children":479},{"__ignoreMap":8},[480,495],{"type":35,"tag":221,"props":481,"children":482},{"class":223,"line":224},[483,487,491],{"type":35,"tag":221,"props":484,"children":485},{"style":228},[486],{"type":40,"value":231},{"type":35,"tag":221,"props":488,"children":489},{"style":234},[490],{"type":40,"value":237},{"type":35,"tag":221,"props":492,"children":493},{"style":234},[494],{"type":40,"value":242},{"type":35,"tag":221,"props":496,"children":497},{"class":223,"line":30},[498,502,506,510],{"type":35,"tag":221,"props":499,"children":500},{"style":228},[501],{"type":40,"value":231},{"type":35,"tag":221,"props":503,"children":504},{"style":234},[505],{"type":40,"value":237},{"type":35,"tag":221,"props":507,"children":508},{"style":234},[509],{"type":40,"value":258},{"type":35,"tag":221,"props":511,"children":512},{"style":234},[513],{"type":40,"value":263},{"type":35,"tag":50,"props":515,"children":516},{"id":266},[517],{"type":40,"value":269},{"type":35,"tag":36,"props":519,"children":520},{},[521],{"type":40,"value":274},{"type":35,"tag":211,"props":523,"children":524},{"className":213,"code":277,"language":215,"meta":8,"style":8},[525],{"type":35,"tag":173,"props":526,"children":527},{"__ignoreMap":8},[528],{"type":35,"tag":221,"props":529,"children":530},{"class":223,"line":224},[531],{"type":35,"tag":221,"props":532,"children":533},{"style":228},[534],{"type":40,"value":277},{"type":35,"tag":43,"props":536,"children":537},{"id":291},[538],{"type":40,"value":294},{"type":35,"tag":43,"props":540,"children":541},{"id":297},[542],{"type":40,"value":300},{"type":35,"tag":302,"props":544,"children":545},{},[546],{"type":40,"value":306},{"title":8,"searchDepth":30,"depth":30,"links":548},[549,555,556],{"id":45,"depth":30,"text":48,"children":550},[551,552,553,554],{"id":52,"depth":312,"text":55},{"id":140,"depth":312,"text":143},{"id":206,"depth":312,"text":209},{"id":266,"depth":312,"text":269},{"id":291,"depth":30,"text":294},{"id":297,"depth":30,"text":300},{"_path":323,"_dir":24,"_draft":7,"_partial":7,"_locale":8,"title":324,"description":325,"published":326,"readTime":28,"slug":327,"seriesId":9,"seriesOrder":224,"body":558,"_type":318,"_id":337,"_source":17,"_file":338,"_extension":321},{"type":32,"children":559,"toc":564},[560],{"type":35,"tag":36,"props":561,"children":562},{},[563],{"type":40,"value":334},{"title":8,"searchDepth":30,"depth":30,"links":565},[],{"_path":567,"_dir":24,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":8,"published":569,"readTime":30,"slug":570,"hasCover":13,"seriesId":8,"body":571,"_type":318,"_id":898,"_source":17,"_file":899,"_extension":321},"/articles/cross-platform-code-deployment","Cross-Platform Code Deployment: GitHub & GitLab","2024/04/28","cross-platform-code-deployment",{"type":32,"children":572,"toc":894},[573,599,604,610,615,631,666,678,710,715,762,768,773,778,835,885,890],{"type":35,"tag":36,"props":574,"children":575},{},[576,578,583,585,590,592,597],{"type":40,"value":577},"Sometimes you might end up in a situation where you have source code that you want to push to multiple git platforms:\n",{"type":35,"tag":83,"props":579,"children":580},{},[581],{"type":40,"value":582},"GitHub",{"type":40,"value":584},", ",{"type":35,"tag":83,"props":586,"children":587},{},[588],{"type":40,"value":589},"Gitlab",{"type":40,"value":591}," or ",{"type":35,"tag":83,"props":593,"children":594},{},[595],{"type":40,"value":596},"Bitbucket",{"type":40,"value":598},". Recently I ended up in the same situation because personally I prefer Gitlab to maintain\nmy projects, but at the same time GitHub is way more popular and I want to showcase my public repositories there as well.\nSo I needed an easy solution to push my code to both platforms.",{"type":35,"tag":36,"props":600,"children":601},{},[602],{"type":40,"value":603},"I'm 100 percent sure there are multiple ways to do that, but I will describe two options to achieve that below. Depending\non how you would like to manage the pushes, you can choose one of them.",{"type":35,"tag":50,"props":605,"children":607},{"id":606},"create-multiple-remotes",[608],{"type":40,"value":609},"Create multiple remotes",{"type":35,"tag":36,"props":611,"children":612},{},[613],{"type":40,"value":614},"In this approach you will be forced to push to each remote individually.",{"type":35,"tag":36,"props":616,"children":617},{},[618,620,629],{"type":40,"value":619},"The default remote of a git repository is named ",{"type":35,"tag":83,"props":621,"children":622},{},[623],{"type":35,"tag":624,"props":625,"children":626},"em",{},[627],{"type":40,"value":628},"origin",{"type":40,"value":630},". You will probably do something like this in the first steps of\nconfiguring your project:",{"type":35,"tag":211,"props":632,"children":634},{"className":213,"code":633,"language":215,"meta":8,"style":8},"git remote add origin git@gitlab.com:username/my-project.git\n",[635],{"type":35,"tag":173,"props":636,"children":637},{"__ignoreMap":8},[638],{"type":35,"tag":221,"props":639,"children":640},{"class":223,"line":224},[641,646,651,656,661],{"type":35,"tag":221,"props":642,"children":643},{"style":228},[644],{"type":40,"value":645},"git",{"type":35,"tag":221,"props":647,"children":648},{"style":234},[649],{"type":40,"value":650}," remote",{"type":35,"tag":221,"props":652,"children":653},{"style":234},[654],{"type":40,"value":655}," add",{"type":35,"tag":221,"props":657,"children":658},{"style":234},[659],{"type":40,"value":660}," origin",{"type":35,"tag":221,"props":662,"children":663},{"style":234},[664],{"type":40,"value":665}," git@gitlab.com:username/my-project.git\n",{"type":35,"tag":36,"props":667,"children":668},{},[669,671,676],{"type":40,"value":670},"So, the first solution is to ",{"type":35,"tag":83,"props":672,"children":673},{},[674],{"type":40,"value":675},"add a new remote",{"type":40,"value":677}," and achieve that by executing the following command:",{"type":35,"tag":211,"props":679,"children":681},{"className":213,"code":680,"language":215,"meta":8,"style":8},"git remote add origin-github git@github.com:username/my-project.git\n",[682],{"type":35,"tag":173,"props":683,"children":684},{"__ignoreMap":8},[685],{"type":35,"tag":221,"props":686,"children":687},{"class":223,"line":224},[688,692,696,700,705],{"type":35,"tag":221,"props":689,"children":690},{"style":228},[691],{"type":40,"value":645},{"type":35,"tag":221,"props":693,"children":694},{"style":234},[695],{"type":40,"value":650},{"type":35,"tag":221,"props":697,"children":698},{"style":234},[699],{"type":40,"value":655},{"type":35,"tag":221,"props":701,"children":702},{"style":234},[703],{"type":40,"value":704}," origin-github",{"type":35,"tag":221,"props":706,"children":707},{"style":234},[708],{"type":40,"value":709}," git@github.com:username/my-project.git\n",{"type":35,"tag":36,"props":711,"children":712},{},[713],{"type":40,"value":714},"And that's pretty much it. When it's time to push your code to the remote, you can execute it using one of the two commands\n(or both if you want to keep both repositories up-to-date):",{"type":35,"tag":211,"props":716,"children":718},{"className":213,"code":717,"language":215,"meta":8,"style":8},"git push origin main\ngit push origin-github main\n",[719],{"type":35,"tag":173,"props":720,"children":721},{"__ignoreMap":8},[722,743],{"type":35,"tag":221,"props":723,"children":724},{"class":223,"line":224},[725,729,734,738],{"type":35,"tag":221,"props":726,"children":727},{"style":228},[728],{"type":40,"value":645},{"type":35,"tag":221,"props":730,"children":731},{"style":234},[732],{"type":40,"value":733}," push",{"type":35,"tag":221,"props":735,"children":736},{"style":234},[737],{"type":40,"value":660},{"type":35,"tag":221,"props":739,"children":740},{"style":234},[741],{"type":40,"value":742}," main\n",{"type":35,"tag":221,"props":744,"children":745},{"class":223,"line":30},[746,750,754,758],{"type":35,"tag":221,"props":747,"children":748},{"style":228},[749],{"type":40,"value":645},{"type":35,"tag":221,"props":751,"children":752},{"style":234},[753],{"type":40,"value":733},{"type":35,"tag":221,"props":755,"children":756},{"style":234},[757],{"type":40,"value":704},{"type":35,"tag":221,"props":759,"children":760},{"style":234},[761],{"type":40,"value":742},{"type":35,"tag":50,"props":763,"children":765},{"id":764},"setup-multiple-push-urls-for-a-remote",[766],{"type":40,"value":767},"Setup multiple push urls for a remote",{"type":35,"tag":36,"props":769,"children":770},{},[771],{"type":40,"value":772},"If you are lazy, and let's be real, most of us, developers, are, you will want to set up the project to have multiple push\nurls for the origin remote. This, however works only if you are sure that you want to keep changes on both projects at the same\ntime.",{"type":35,"tag":36,"props":774,"children":775},{},[776],{"type":40,"value":777},"So, that you need to do is to set the push url on the remote two times: first one is the url of the original project and\nthe second one is the url of the second project on a different platform. The commands are:",{"type":35,"tag":211,"props":779,"children":781},{"className":213,"code":780,"language":215,"meta":8,"style":8},"# for the original project on gitlab\ngit remote set-url --add --push origin git@gitlab.com:username/my-project.git\n",[782],{"type":35,"tag":173,"props":783,"children":784},{"__ignoreMap":8},[785,800],{"type":35,"tag":221,"props":786,"children":787},{"class":223,"line":224},[788,794],{"type":35,"tag":221,"props":789,"children":791},{"style":790},"--shiki-default:#637777",[792],{"type":40,"value":793},"#",{"type":35,"tag":221,"props":795,"children":797},{"style":796},"--shiki-default:#637777;--shiki-default-font-style:italic",[798],{"type":40,"value":799}," for the original project on gitlab\n",{"type":35,"tag":221,"props":801,"children":802},{"class":223,"line":30},[803,807,811,816,822,827,831],{"type":35,"tag":221,"props":804,"children":805},{"style":228},[806],{"type":40,"value":645},{"type":35,"tag":221,"props":808,"children":809},{"style":234},[810],{"type":40,"value":650},{"type":35,"tag":221,"props":812,"children":813},{"style":234},[814],{"type":40,"value":815}," set-url",{"type":35,"tag":221,"props":817,"children":819},{"style":818},"--shiki-default:#82AAFF",[820],{"type":40,"value":821}," --add",{"type":35,"tag":221,"props":823,"children":824},{"style":818},[825],{"type":40,"value":826}," --push",{"type":35,"tag":221,"props":828,"children":829},{"style":234},[830],{"type":40,"value":660},{"type":35,"tag":221,"props":832,"children":833},{"style":234},[834],{"type":40,"value":665},{"type":35,"tag":211,"props":836,"children":838},{"className":213,"code":837,"language":215,"meta":8,"style":8},"# for the second project on github\ngit remote set-url --add --push origin git@github.com:username/my-project.git\n",[839],{"type":35,"tag":173,"props":840,"children":841},{"__ignoreMap":8},[842,854],{"type":35,"tag":221,"props":843,"children":844},{"class":223,"line":224},[845,849],{"type":35,"tag":221,"props":846,"children":847},{"style":790},[848],{"type":40,"value":793},{"type":35,"tag":221,"props":850,"children":851},{"style":796},[852],{"type":40,"value":853}," for the second project on github\n",{"type":35,"tag":221,"props":855,"children":856},{"class":223,"line":30},[857,861,865,869,873,877,881],{"type":35,"tag":221,"props":858,"children":859},{"style":228},[860],{"type":40,"value":645},{"type":35,"tag":221,"props":862,"children":863},{"style":234},[864],{"type":40,"value":650},{"type":35,"tag":221,"props":866,"children":867},{"style":234},[868],{"type":40,"value":815},{"type":35,"tag":221,"props":870,"children":871},{"style":818},[872],{"type":40,"value":821},{"type":35,"tag":221,"props":874,"children":875},{"style":818},[876],{"type":40,"value":826},{"type":35,"tag":221,"props":878,"children":879},{"style":234},[880],{"type":40,"value":660},{"type":35,"tag":221,"props":882,"children":883},{"style":234},[884],{"type":40,"value":709},{"type":35,"tag":36,"props":886,"children":887},{},[888],{"type":40,"value":889},"And that's it. You are good to go! :)",{"type":35,"tag":302,"props":891,"children":892},{},[893],{"type":40,"value":306},{"title":8,"searchDepth":30,"depth":30,"links":895},[896,897],{"id":606,"depth":312,"text":609},{"id":764,"depth":312,"text":767},"content:articles:cross-platform-code-deployment.md","articles/cross-platform-code-deployment.md",{"_path":901,"_dir":24,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":902,"published":903,"readTime":28,"slug":904,"github":905,"videoId":906,"hasCover":13,"body":907,"_type":318,"_id":5564,"_source":17,"_file":5565,"_extension":321},"/articles/wiggle-animation","Wiggle Animation using CSS and Angular Animations","2024/04/07","wiggle-animation","OwlHowl3/wiggle-animation-angular","4X24t9keUVg",{"type":32,"children":908,"toc":5556},[909,927,932,938,965,1090,1095,1295,1300,1305,1632,1643,1936,1941,1953,2246,2252,2257,2285,2443,2456,2762,2768,2795,3083,3088,3184,3190,3210,3341,3352,3404,3421,3506,3545,3816,3828,4154,4177,4515,4528,4690,4696,4708,5089,5107,5291,5309,5521,5526,5532,5552],{"type":35,"tag":36,"props":910,"children":911},{},[912,914,919,921,926],{"type":40,"value":913},"Ever wondered how those app icons on your iPhone or MacBook wiggle so charmingly? Or what makes that playful animation\npop up when you type a wrong word in Wordle? Well, it's very simple and it's all about a minimal animation. This article\nshows how to create a simple animation using plain ",{"type":35,"tag":83,"props":915,"children":916},{},[917],{"type":40,"value":918},"CSS",{"type":40,"value":920}," and then proceeds with ",{"type":35,"tag":83,"props":922,"children":923},{},[924],{"type":40,"value":925},"Angular animations",{"type":40,"value":76},{"type":35,"tag":36,"props":928,"children":929},{},[930],{"type":40,"value":931},"Before we start, you might wonder why would you need such a functionality? Right of the top of my head, you can include\nthose into the validation process of some fields, or you might use them as a mean to gather users' attention.",{"type":35,"tag":50,"props":933,"children":935},{"id":934},"simple-css-solution",[936],{"type":40,"value":937},"Simple CSS Solution",{"type":35,"tag":36,"props":939,"children":940},{},[941,943,949,951,956,958,963],{"type":40,"value":942},"Let's start by creating a new angular component using ",{"type":35,"tag":173,"props":944,"children":946},{"className":945},[],[947],{"type":40,"value":948},"ng g c wiggle-css",{"type":40,"value":950},". In the template file we will add a simple\nlabel and a button that will be further animated. The button will have two classes - ",{"type":35,"tag":624,"props":952,"children":953},{},[954],{"type":40,"value":955},"button",{"type":40,"value":957}," for general styling and\n",{"type":35,"tag":624,"props":959,"children":960},{},[961],{"type":40,"value":962},"wiggle",{"type":40,"value":964}," that will be responsible for the animation.",{"type":35,"tag":211,"props":966,"children":970},{"className":967,"code":968,"language":969,"meta":8,"style":8},"language-html shiki shiki-themes night-owl","\u003C!-- wiggle-css.component.html -->\n\u003Cdiv>Pure CSS\u003C/div>\n\u003Cbutton class=\"button wiggle\">Hey!\u003C/button>\n","html",[971],{"type":35,"tag":173,"props":972,"children":973},{"__ignoreMap":8},[974,992,1032],{"type":35,"tag":221,"props":975,"children":976},{"class":223,"line":224},[977,982,987],{"type":35,"tag":221,"props":978,"children":979},{"style":790},[980],{"type":40,"value":981},"\u003C!--",{"type":35,"tag":221,"props":983,"children":984},{"style":796},[985],{"type":40,"value":986}," wiggle-css.component.html ",{"type":35,"tag":221,"props":988,"children":989},{"style":790},[990],{"type":40,"value":991},"-->\n",{"type":35,"tag":221,"props":993,"children":994},{"class":223,"line":30},[995,1001,1007,1012,1018,1023,1027],{"type":35,"tag":221,"props":996,"children":998},{"style":997},"--shiki-default:#7FDBCA",[999],{"type":40,"value":1000},"\u003C",{"type":35,"tag":221,"props":1002,"children":1004},{"style":1003},"--shiki-default:#CAECE6",[1005],{"type":40,"value":1006},"div",{"type":35,"tag":221,"props":1008,"children":1009},{"style":997},[1010],{"type":40,"value":1011},">",{"type":35,"tag":221,"props":1013,"children":1015},{"style":1014},"--shiki-default:#D6DEEB",[1016],{"type":40,"value":1017},"Pure CSS",{"type":35,"tag":221,"props":1019,"children":1020},{"style":997},[1021],{"type":40,"value":1022},"\u003C/",{"type":35,"tag":221,"props":1024,"children":1025},{"style":1003},[1026],{"type":40,"value":1006},{"type":35,"tag":221,"props":1028,"children":1029},{"style":997},[1030],{"type":40,"value":1031},">\n",{"type":35,"tag":221,"props":1033,"children":1034},{"class":223,"line":312},[1035,1039,1043,1049,1054,1060,1065,1069,1073,1078,1082,1086],{"type":35,"tag":221,"props":1036,"children":1037},{"style":997},[1038],{"type":40,"value":1000},{"type":35,"tag":221,"props":1040,"children":1041},{"style":1003},[1042],{"type":40,"value":955},{"type":35,"tag":221,"props":1044,"children":1046},{"style":1045},"--shiki-default:#C5E478;--shiki-default-font-style:italic",[1047],{"type":40,"value":1048}," class",{"type":35,"tag":221,"props":1050,"children":1051},{"style":997},[1052],{"type":40,"value":1053},"=",{"type":35,"tag":221,"props":1055,"children":1057},{"style":1056},"--shiki-default:#D9F5DD",[1058],{"type":40,"value":1059},"\"",{"type":35,"tag":221,"props":1061,"children":1062},{"style":234},[1063],{"type":40,"value":1064},"button wiggle",{"type":35,"tag":221,"props":1066,"children":1067},{"style":1056},[1068],{"type":40,"value":1059},{"type":35,"tag":221,"props":1070,"children":1071},{"style":997},[1072],{"type":40,"value":1011},{"type":35,"tag":221,"props":1074,"children":1075},{"style":1014},[1076],{"type":40,"value":1077},"Hey!",{"type":35,"tag":221,"props":1079,"children":1080},{"style":997},[1081],{"type":40,"value":1022},{"type":35,"tag":221,"props":1083,"children":1084},{"style":1003},[1085],{"type":40,"value":955},{"type":35,"tag":221,"props":1087,"children":1088},{"style":997},[1089],{"type":40,"value":1031},{"type":35,"tag":36,"props":1091,"children":1092},{},[1093],{"type":40,"value":1094},"With the template in place, let's move on to the styling and update the component css file like this:",{"type":35,"tag":211,"props":1096,"children":1100},{"className":1097,"code":1098,"language":1099,"meta":8,"style":8},"language-css shiki shiki-themes night-owl","/* wiggle-css.component.scss */\n:host {\n  width: 50vw;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n  gap: 1rem;\n}\n","css",[1101],{"type":35,"tag":173,"props":1102,"children":1103},{"__ignoreMap":8},[1104,1122,1141,1172,1195,1216,1237,1259,1286],{"type":35,"tag":221,"props":1105,"children":1106},{"class":223,"line":224},[1107,1112,1117],{"type":35,"tag":221,"props":1108,"children":1109},{"style":790},[1110],{"type":40,"value":1111},"/*",{"type":35,"tag":221,"props":1113,"children":1114},{"style":796},[1115],{"type":40,"value":1116}," wiggle-css.component.scss ",{"type":35,"tag":221,"props":1118,"children":1119},{"style":790},[1120],{"type":40,"value":1121},"*/\n",{"type":35,"tag":221,"props":1123,"children":1124},{"class":223,"line":30},[1125,1131,1136],{"type":35,"tag":221,"props":1126,"children":1128},{"style":1127},"--shiki-default:#C5E478",[1129],{"type":40,"value":1130},":",{"type":35,"tag":221,"props":1132,"children":1133},{"style":1045},[1134],{"type":40,"value":1135},"host",{"type":35,"tag":221,"props":1137,"children":1138},{"style":1014},[1139],{"type":40,"value":1140}," {\n",{"type":35,"tag":221,"props":1142,"children":1143},{"class":223,"line":312},[1144,1150,1155,1161,1167],{"type":35,"tag":221,"props":1145,"children":1147},{"style":1146},"--shiki-default:#80CBC4",[1148],{"type":40,"value":1149},"  width",{"type":35,"tag":221,"props":1151,"children":1152},{"style":1014},[1153],{"type":40,"value":1154},": ",{"type":35,"tag":221,"props":1156,"children":1158},{"style":1157},"--shiki-default:#F78C6C",[1159],{"type":40,"value":1160},"50",{"type":35,"tag":221,"props":1162,"children":1164},{"style":1163},"--shiki-default:#FFEB95",[1165],{"type":40,"value":1166},"vw",{"type":35,"tag":221,"props":1168,"children":1169},{"style":1014},[1170],{"type":40,"value":1171},";\n",{"type":35,"tag":221,"props":1173,"children":1175},{"class":223,"line":1174},4,[1176,1181,1185,1191],{"type":35,"tag":221,"props":1177,"children":1178},{"style":1146},[1179],{"type":40,"value":1180},"  display",{"type":35,"tag":221,"props":1182,"children":1183},{"style":1014},[1184],{"type":40,"value":1154},{"type":35,"tag":221,"props":1186,"children":1188},{"style":1187},"--shiki-default:#FF6363",[1189],{"type":40,"value":1190},"flex",{"type":35,"tag":221,"props":1192,"children":1193},{"style":1014},[1194],{"type":40,"value":1171},{"type":35,"tag":221,"props":1196,"children":1197},{"class":223,"line":28},[1198,1203,1207,1212],{"type":35,"tag":221,"props":1199,"children":1200},{"style":1146},[1201],{"type":40,"value":1202},"  align-items",{"type":35,"tag":221,"props":1204,"children":1205},{"style":1014},[1206],{"type":40,"value":1154},{"type":35,"tag":221,"props":1208,"children":1209},{"style":1187},[1210],{"type":40,"value":1211},"center",{"type":35,"tag":221,"props":1213,"children":1214},{"style":1014},[1215],{"type":40,"value":1171},{"type":35,"tag":221,"props":1217,"children":1219},{"class":223,"line":1218},6,[1220,1225,1229,1233],{"type":35,"tag":221,"props":1221,"children":1222},{"style":1146},[1223],{"type":40,"value":1224},"  justify-content",{"type":35,"tag":221,"props":1226,"children":1227},{"style":1014},[1228],{"type":40,"value":1154},{"type":35,"tag":221,"props":1230,"children":1231},{"style":1187},[1232],{"type":40,"value":1211},{"type":35,"tag":221,"props":1234,"children":1235},{"style":1014},[1236],{"type":40,"value":1171},{"type":35,"tag":221,"props":1238,"children":1240},{"class":223,"line":1239},7,[1241,1246,1250,1255],{"type":35,"tag":221,"props":1242,"children":1243},{"style":1146},[1244],{"type":40,"value":1245},"  flex-direction",{"type":35,"tag":221,"props":1247,"children":1248},{"style":1014},[1249],{"type":40,"value":1154},{"type":35,"tag":221,"props":1251,"children":1252},{"style":1187},[1253],{"type":40,"value":1254},"column",{"type":35,"tag":221,"props":1256,"children":1257},{"style":1014},[1258],{"type":40,"value":1171},{"type":35,"tag":221,"props":1260,"children":1262},{"class":223,"line":1261},8,[1263,1268,1272,1277,1282],{"type":35,"tag":221,"props":1264,"children":1265},{"style":1146},[1266],{"type":40,"value":1267},"  gap",{"type":35,"tag":221,"props":1269,"children":1270},{"style":1014},[1271],{"type":40,"value":1154},{"type":35,"tag":221,"props":1273,"children":1274},{"style":1157},[1275],{"type":40,"value":1276},"1",{"type":35,"tag":221,"props":1278,"children":1279},{"style":1163},[1280],{"type":40,"value":1281},"rem",{"type":35,"tag":221,"props":1283,"children":1284},{"style":1014},[1285],{"type":40,"value":1171},{"type":35,"tag":221,"props":1287,"children":1289},{"class":223,"line":1288},9,[1290],{"type":35,"tag":221,"props":1291,"children":1292},{"style":1014},[1293],{"type":40,"value":1294},"}\n",{"type":35,"tag":36,"props":1296,"children":1297},{},[1298],{"type":40,"value":1299},"First of all, let's add some styles to the component host. The combination of classes used above will make the content\nof the component go 50% width, all items will be centered and will be displayed vertically with some space between them.",{"type":35,"tag":36,"props":1301,"children":1302},{},[1303],{"type":40,"value":1304},"Moving on to the button - let's apply some general styles to it, so it will look prettier than the default html version.\nThe button class will look like this:",{"type":35,"tag":211,"props":1306,"children":1308},{"className":1097,"code":1307,"language":1099,"meta":8,"style":8},"/* wiggle-css.component.scss */\n.button {\n  color: rgb(255, 255, 255);\n  background-color: rgb(79 70 229);\n  border: none;\n  border-radius: 0.375rem;\n  font-weight: 600;\n  font-size: 0.875rem;\n  line-height: 1.25rem;\n  padding: 0.5rem 0.75rem;\n  text-decoration: none;\n  cursor: pointer;\n}\n",[1309],{"type":35,"tag":173,"props":1310,"children":1311},{"__ignoreMap":8},[1312,1327,1342,1390,1429,1450,1475,1496,1521,1546,1581,1602,1624],{"type":35,"tag":221,"props":1313,"children":1314},{"class":223,"line":224},[1315,1319,1323],{"type":35,"tag":221,"props":1316,"children":1317},{"style":790},[1318],{"type":40,"value":1111},{"type":35,"tag":221,"props":1320,"children":1321},{"style":796},[1322],{"type":40,"value":1116},{"type":35,"tag":221,"props":1324,"children":1325},{"style":790},[1326],{"type":40,"value":1121},{"type":35,"tag":221,"props":1328,"children":1329},{"class":223,"line":30},[1330,1334,1338],{"type":35,"tag":221,"props":1331,"children":1332},{"style":1127},[1333],{"type":40,"value":76},{"type":35,"tag":221,"props":1335,"children":1336},{"style":1045},[1337],{"type":40,"value":955},{"type":35,"tag":221,"props":1339,"children":1340},{"style":1014},[1341],{"type":40,"value":1140},{"type":35,"tag":221,"props":1343,"children":1344},{"class":223,"line":312},[1345,1350,1354,1359,1364,1369,1373,1377,1381,1385],{"type":35,"tag":221,"props":1346,"children":1347},{"style":1146},[1348],{"type":40,"value":1349},"  color",{"type":35,"tag":221,"props":1351,"children":1352},{"style":1014},[1353],{"type":40,"value":1154},{"type":35,"tag":221,"props":1355,"children":1356},{"style":1127},[1357],{"type":40,"value":1358},"rgb",{"type":35,"tag":221,"props":1360,"children":1361},{"style":1014},[1362],{"type":40,"value":1363},"(",{"type":35,"tag":221,"props":1365,"children":1366},{"style":1157},[1367],{"type":40,"value":1368},"255",{"type":35,"tag":221,"props":1370,"children":1371},{"style":1014},[1372],{"type":40,"value":584},{"type":35,"tag":221,"props":1374,"children":1375},{"style":1157},[1376],{"type":40,"value":1368},{"type":35,"tag":221,"props":1378,"children":1379},{"style":1014},[1380],{"type":40,"value":584},{"type":35,"tag":221,"props":1382,"children":1383},{"style":1157},[1384],{"type":40,"value":1368},{"type":35,"tag":221,"props":1386,"children":1387},{"style":1014},[1388],{"type":40,"value":1389},");\n",{"type":35,"tag":221,"props":1391,"children":1392},{"class":223,"line":1174},[1393,1398,1402,1406,1410,1415,1420,1425],{"type":35,"tag":221,"props":1394,"children":1395},{"style":1146},[1396],{"type":40,"value":1397},"  background-color",{"type":35,"tag":221,"props":1399,"children":1400},{"style":1014},[1401],{"type":40,"value":1154},{"type":35,"tag":221,"props":1403,"children":1404},{"style":1127},[1405],{"type":40,"value":1358},{"type":35,"tag":221,"props":1407,"children":1408},{"style":1014},[1409],{"type":40,"value":1363},{"type":35,"tag":221,"props":1411,"children":1412},{"style":1157},[1413],{"type":40,"value":1414},"79",{"type":35,"tag":221,"props":1416,"children":1417},{"style":1157},[1418],{"type":40,"value":1419}," 70",{"type":35,"tag":221,"props":1421,"children":1422},{"style":1157},[1423],{"type":40,"value":1424}," 229",{"type":35,"tag":221,"props":1426,"children":1427},{"style":1014},[1428],{"type":40,"value":1389},{"type":35,"tag":221,"props":1430,"children":1431},{"class":223,"line":28},[1432,1437,1441,1446],{"type":35,"tag":221,"props":1433,"children":1434},{"style":1146},[1435],{"type":40,"value":1436},"  border",{"type":35,"tag":221,"props":1438,"children":1439},{"style":1014},[1440],{"type":40,"value":1154},{"type":35,"tag":221,"props":1442,"children":1443},{"style":1187},[1444],{"type":40,"value":1445},"none",{"type":35,"tag":221,"props":1447,"children":1448},{"style":1014},[1449],{"type":40,"value":1171},{"type":35,"tag":221,"props":1451,"children":1452},{"class":223,"line":1218},[1453,1458,1462,1467,1471],{"type":35,"tag":221,"props":1454,"children":1455},{"style":1146},[1456],{"type":40,"value":1457},"  border-radius",{"type":35,"tag":221,"props":1459,"children":1460},{"style":1014},[1461],{"type":40,"value":1154},{"type":35,"tag":221,"props":1463,"children":1464},{"style":1157},[1465],{"type":40,"value":1466},"0.375",{"type":35,"tag":221,"props":1468,"children":1469},{"style":1163},[1470],{"type":40,"value":1281},{"type":35,"tag":221,"props":1472,"children":1473},{"style":1014},[1474],{"type":40,"value":1171},{"type":35,"tag":221,"props":1476,"children":1477},{"class":223,"line":1239},[1478,1483,1487,1492],{"type":35,"tag":221,"props":1479,"children":1480},{"style":1146},[1481],{"type":40,"value":1482},"  font-weight",{"type":35,"tag":221,"props":1484,"children":1485},{"style":1014},[1486],{"type":40,"value":1154},{"type":35,"tag":221,"props":1488,"children":1489},{"style":1157},[1490],{"type":40,"value":1491},"600",{"type":35,"tag":221,"props":1493,"children":1494},{"style":1014},[1495],{"type":40,"value":1171},{"type":35,"tag":221,"props":1497,"children":1498},{"class":223,"line":1261},[1499,1504,1508,1513,1517],{"type":35,"tag":221,"props":1500,"children":1501},{"style":1146},[1502],{"type":40,"value":1503},"  font-size",{"type":35,"tag":221,"props":1505,"children":1506},{"style":1014},[1507],{"type":40,"value":1154},{"type":35,"tag":221,"props":1509,"children":1510},{"style":1157},[1511],{"type":40,"value":1512},"0.875",{"type":35,"tag":221,"props":1514,"children":1515},{"style":1163},[1516],{"type":40,"value":1281},{"type":35,"tag":221,"props":1518,"children":1519},{"style":1014},[1520],{"type":40,"value":1171},{"type":35,"tag":221,"props":1522,"children":1523},{"class":223,"line":1288},[1524,1529,1533,1538,1542],{"type":35,"tag":221,"props":1525,"children":1526},{"style":1146},[1527],{"type":40,"value":1528},"  line-height",{"type":35,"tag":221,"props":1530,"children":1531},{"style":1014},[1532],{"type":40,"value":1154},{"type":35,"tag":221,"props":1534,"children":1535},{"style":1157},[1536],{"type":40,"value":1537},"1.25",{"type":35,"tag":221,"props":1539,"children":1540},{"style":1163},[1541],{"type":40,"value":1281},{"type":35,"tag":221,"props":1543,"children":1544},{"style":1014},[1545],{"type":40,"value":1171},{"type":35,"tag":221,"props":1547,"children":1549},{"class":223,"line":1548},10,[1550,1555,1559,1564,1568,1573,1577],{"type":35,"tag":221,"props":1551,"children":1552},{"style":1146},[1553],{"type":40,"value":1554},"  padding",{"type":35,"tag":221,"props":1556,"children":1557},{"style":1014},[1558],{"type":40,"value":1154},{"type":35,"tag":221,"props":1560,"children":1561},{"style":1157},[1562],{"type":40,"value":1563},"0.5",{"type":35,"tag":221,"props":1565,"children":1566},{"style":1163},[1567],{"type":40,"value":1281},{"type":35,"tag":221,"props":1569,"children":1570},{"style":1157},[1571],{"type":40,"value":1572}," 0.75",{"type":35,"tag":221,"props":1574,"children":1575},{"style":1163},[1576],{"type":40,"value":1281},{"type":35,"tag":221,"props":1578,"children":1579},{"style":1014},[1580],{"type":40,"value":1171},{"type":35,"tag":221,"props":1582,"children":1584},{"class":223,"line":1583},11,[1585,1590,1594,1598],{"type":35,"tag":221,"props":1586,"children":1587},{"style":1146},[1588],{"type":40,"value":1589},"  text-decoration",{"type":35,"tag":221,"props":1591,"children":1592},{"style":1014},[1593],{"type":40,"value":1154},{"type":35,"tag":221,"props":1595,"children":1596},{"style":1187},[1597],{"type":40,"value":1445},{"type":35,"tag":221,"props":1599,"children":1600},{"style":1014},[1601],{"type":40,"value":1171},{"type":35,"tag":221,"props":1603,"children":1605},{"class":223,"line":1604},12,[1606,1611,1615,1620],{"type":35,"tag":221,"props":1607,"children":1608},{"style":1146},[1609],{"type":40,"value":1610},"  cursor",{"type":35,"tag":221,"props":1612,"children":1613},{"style":1014},[1614],{"type":40,"value":1154},{"type":35,"tag":221,"props":1616,"children":1617},{"style":1187},[1618],{"type":40,"value":1619},"pointer",{"type":35,"tag":221,"props":1621,"children":1622},{"style":1014},[1623],{"type":40,"value":1171},{"type":35,"tag":221,"props":1625,"children":1627},{"class":223,"line":1626},13,[1628],{"type":35,"tag":221,"props":1629,"children":1630},{"style":1014},[1631],{"type":40,"value":1294},{"type":35,"tag":36,"props":1633,"children":1634},{},[1635,1637,1641],{"type":40,"value":1636},"Finally, the most important piece is the wiggle class. We will make use of css animations and will create a new animation\nwith name ",{"type":35,"tag":624,"props":1638,"children":1639},{},[1640],{"type":40,"value":962},{"type":40,"value":1642},", which will last for 1 second and will have an ease-in-out timing. For the defined animation we need\nto attach the keyframes and apply the necessary transforms so that the elements will \"shake\". The desired effect will be\nachieved by setting the rotation to 0 degrees at start (0%) and end (100%) of the animation. The in-between states will\nhave either 10 degree (17%, 50%, 84%) or -10 degree (35%, 67%) rotation.",{"type":35,"tag":211,"props":1644,"children":1646},{"className":1097,"code":1645,"language":1099,"meta":8,"style":8},"/* wiggle-css.component.scss */\n.wiggle {\n    animation: wiggle;\n    animation-duration: 1s;\n    animation-timing-function: ease-in-out;\n}\n\n@keyframes wiggle {\n    0%, 100% {\n        transform: rotate(0deg);\n    }\n    17%, 50%, 84% {\n        transform: rotate(10deg);\n    }\n    35%, 67% {\n        transform: rotate(-10deg);\n    }\n}\n",[1647],{"type":35,"tag":173,"props":1648,"children":1649},{"__ignoreMap":8},[1650,1665,1680,1693,1718,1739,1746,1754,1779,1787,1822,1830,1838,1870,1878,1887,1920,1928],{"type":35,"tag":221,"props":1651,"children":1652},{"class":223,"line":224},[1653,1657,1661],{"type":35,"tag":221,"props":1654,"children":1655},{"style":790},[1656],{"type":40,"value":1111},{"type":35,"tag":221,"props":1658,"children":1659},{"style":796},[1660],{"type":40,"value":1116},{"type":35,"tag":221,"props":1662,"children":1663},{"style":790},[1664],{"type":40,"value":1121},{"type":35,"tag":221,"props":1666,"children":1667},{"class":223,"line":30},[1668,1672,1676],{"type":35,"tag":221,"props":1669,"children":1670},{"style":1127},[1671],{"type":40,"value":76},{"type":35,"tag":221,"props":1673,"children":1674},{"style":1045},[1675],{"type":40,"value":962},{"type":35,"tag":221,"props":1677,"children":1678},{"style":1014},[1679],{"type":40,"value":1140},{"type":35,"tag":221,"props":1681,"children":1682},{"class":223,"line":312},[1683,1688],{"type":35,"tag":221,"props":1684,"children":1685},{"style":1146},[1686],{"type":40,"value":1687},"    animation",{"type":35,"tag":221,"props":1689,"children":1690},{"style":1014},[1691],{"type":40,"value":1692},": wiggle;\n",{"type":35,"tag":221,"props":1694,"children":1695},{"class":223,"line":1174},[1696,1701,1705,1709,1714],{"type":35,"tag":221,"props":1697,"children":1698},{"style":1146},[1699],{"type":40,"value":1700},"    animation-duration",{"type":35,"tag":221,"props":1702,"children":1703},{"style":1014},[1704],{"type":40,"value":1154},{"type":35,"tag":221,"props":1706,"children":1707},{"style":1157},[1708],{"type":40,"value":1276},{"type":35,"tag":221,"props":1710,"children":1711},{"style":1163},[1712],{"type":40,"value":1713},"s",{"type":35,"tag":221,"props":1715,"children":1716},{"style":1014},[1717],{"type":40,"value":1171},{"type":35,"tag":221,"props":1719,"children":1720},{"class":223,"line":28},[1721,1726,1730,1735],{"type":35,"tag":221,"props":1722,"children":1723},{"style":1146},[1724],{"type":40,"value":1725},"    animation-timing-function",{"type":35,"tag":221,"props":1727,"children":1728},{"style":1014},[1729],{"type":40,"value":1154},{"type":35,"tag":221,"props":1731,"children":1732},{"style":1187},[1733],{"type":40,"value":1734},"ease-in-out",{"type":35,"tag":221,"props":1736,"children":1737},{"style":1014},[1738],{"type":40,"value":1171},{"type":35,"tag":221,"props":1740,"children":1741},{"class":223,"line":1218},[1742],{"type":35,"tag":221,"props":1743,"children":1744},{"style":1014},[1745],{"type":40,"value":1294},{"type":35,"tag":221,"props":1747,"children":1748},{"class":223,"line":1239},[1749],{"type":35,"tag":221,"props":1750,"children":1751},{"emptyLinePlaceholder":13},[1752],{"type":40,"value":1753},"\n",{"type":35,"tag":221,"props":1755,"children":1756},{"class":223,"line":1261},[1757,1763,1769,1775],{"type":35,"tag":221,"props":1758,"children":1760},{"style":1759},"--shiki-default:#C792EA",[1761],{"type":40,"value":1762},"@",{"type":35,"tag":221,"props":1764,"children":1766},{"style":1765},"--shiki-default:#C792EA;--shiki-default-font-style:italic",[1767],{"type":40,"value":1768},"keyframes",{"type":35,"tag":221,"props":1770,"children":1772},{"style":1771},"--shiki-default:#D7DBE0",[1773],{"type":40,"value":1774}," wiggle",{"type":35,"tag":221,"props":1776,"children":1777},{"style":1014},[1778],{"type":40,"value":1140},{"type":35,"tag":221,"props":1780,"children":1781},{"class":223,"line":1288},[1782],{"type":35,"tag":221,"props":1783,"children":1784},{"style":1014},[1785],{"type":40,"value":1786},"    0%, 100% {\n",{"type":35,"tag":221,"props":1788,"children":1789},{"class":223,"line":1548},[1790,1795,1799,1804,1808,1813,1818],{"type":35,"tag":221,"props":1791,"children":1792},{"style":1146},[1793],{"type":40,"value":1794},"        transform",{"type":35,"tag":221,"props":1796,"children":1797},{"style":1014},[1798],{"type":40,"value":1154},{"type":35,"tag":221,"props":1800,"children":1801},{"style":1127},[1802],{"type":40,"value":1803},"rotate",{"type":35,"tag":221,"props":1805,"children":1806},{"style":1014},[1807],{"type":40,"value":1363},{"type":35,"tag":221,"props":1809,"children":1810},{"style":1157},[1811],{"type":40,"value":1812},"0",{"type":35,"tag":221,"props":1814,"children":1815},{"style":1163},[1816],{"type":40,"value":1817},"deg",{"type":35,"tag":221,"props":1819,"children":1820},{"style":1014},[1821],{"type":40,"value":1389},{"type":35,"tag":221,"props":1823,"children":1824},{"class":223,"line":1583},[1825],{"type":35,"tag":221,"props":1826,"children":1827},{"style":1014},[1828],{"type":40,"value":1829},"    }\n",{"type":35,"tag":221,"props":1831,"children":1832},{"class":223,"line":1604},[1833],{"type":35,"tag":221,"props":1834,"children":1835},{"style":1014},[1836],{"type":40,"value":1837},"    17%, 50%, 84% {\n",{"type":35,"tag":221,"props":1839,"children":1840},{"class":223,"line":1626},[1841,1845,1849,1853,1857,1862,1866],{"type":35,"tag":221,"props":1842,"children":1843},{"style":1146},[1844],{"type":40,"value":1794},{"type":35,"tag":221,"props":1846,"children":1847},{"style":1014},[1848],{"type":40,"value":1154},{"type":35,"tag":221,"props":1850,"children":1851},{"style":1127},[1852],{"type":40,"value":1803},{"type":35,"tag":221,"props":1854,"children":1855},{"style":1014},[1856],{"type":40,"value":1363},{"type":35,"tag":221,"props":1858,"children":1859},{"style":1157},[1860],{"type":40,"value":1861},"10",{"type":35,"tag":221,"props":1863,"children":1864},{"style":1163},[1865],{"type":40,"value":1817},{"type":35,"tag":221,"props":1867,"children":1868},{"style":1014},[1869],{"type":40,"value":1389},{"type":35,"tag":221,"props":1871,"children":1873},{"class":223,"line":1872},14,[1874],{"type":35,"tag":221,"props":1875,"children":1876},{"style":1014},[1877],{"type":40,"value":1829},{"type":35,"tag":221,"props":1879,"children":1881},{"class":223,"line":1880},15,[1882],{"type":35,"tag":221,"props":1883,"children":1884},{"style":1014},[1885],{"type":40,"value":1886},"    35%, 67% {\n",{"type":35,"tag":221,"props":1888,"children":1890},{"class":223,"line":1889},16,[1891,1895,1899,1903,1907,1912,1916],{"type":35,"tag":221,"props":1892,"children":1893},{"style":1146},[1894],{"type":40,"value":1794},{"type":35,"tag":221,"props":1896,"children":1897},{"style":1014},[1898],{"type":40,"value":1154},{"type":35,"tag":221,"props":1900,"children":1901},{"style":1127},[1902],{"type":40,"value":1803},{"type":35,"tag":221,"props":1904,"children":1905},{"style":1014},[1906],{"type":40,"value":1363},{"type":35,"tag":221,"props":1908,"children":1909},{"style":1157},[1910],{"type":40,"value":1911},"-10",{"type":35,"tag":221,"props":1913,"children":1914},{"style":1163},[1915],{"type":40,"value":1817},{"type":35,"tag":221,"props":1917,"children":1918},{"style":1014},[1919],{"type":40,"value":1389},{"type":35,"tag":221,"props":1921,"children":1923},{"class":223,"line":1922},17,[1924],{"type":35,"tag":221,"props":1925,"children":1926},{"style":1014},[1927],{"type":40,"value":1829},{"type":35,"tag":221,"props":1929,"children":1931},{"class":223,"line":1930},18,[1932],{"type":35,"tag":221,"props":1933,"children":1934},{"style":1014},[1935],{"type":40,"value":1294},{"type":35,"tag":36,"props":1937,"children":1938},{},[1939],{"type":40,"value":1940},"This is it, a simple wiggle animation on our button using just an animation class with some keyframes attached to it.",{"type":35,"tag":36,"props":1942,"children":1943},{},[1944,1946,1951],{"type":40,"value":1945},"The simple solution above is fine, but it can be improved. First of all, it runs only once and second, it runs immediately.\nWhat we want to achieve is to have the animation run multiple times and have a pause between each run. For that we can\nuse another animation property and that is ",{"type":35,"tag":624,"props":1947,"children":1948},{},[1949],{"type":40,"value":1950},"animation-iteration-count",{"type":40,"value":1952}," alongside with updated duration to 4 seconds and\nmodified keyframe timestamps. So, we will set the iteration count to infinite and make all the rotations between the 80%\nkeyframe and 100% keyframe. The updated css should look like this:",{"type":35,"tag":211,"props":1954,"children":1956},{"className":1097,"code":1955,"language":1099,"meta":8,"style":8},"/* wiggle-css.component.scss */\n.wiggle {\n    animation: wiggle;\n    animation-duration: 4s;\n    animation-iteration-count: infinite;\n    animation-timing-function: ease-in-out;\n}\n\n@keyframes wiggle {\n  80%, 100% {\n    transform: rotate(0deg);\n  }\n  83%, 89%, 97% {\n    transform: rotate(10deg);\n  }\n  86%, 93% {\n    transform: rotate(-10deg);\n  }\n}\n",[1957],{"type":35,"tag":173,"props":1958,"children":1959},{"__ignoreMap":8},[1960,1975,1990,2001,2025,2046,2065,2072,2079,2098,2106,2138,2146,2154,2185,2192,2200,2231,2238],{"type":35,"tag":221,"props":1961,"children":1962},{"class":223,"line":224},[1963,1967,1971],{"type":35,"tag":221,"props":1964,"children":1965},{"style":790},[1966],{"type":40,"value":1111},{"type":35,"tag":221,"props":1968,"children":1969},{"style":796},[1970],{"type":40,"value":1116},{"type":35,"tag":221,"props":1972,"children":1973},{"style":790},[1974],{"type":40,"value":1121},{"type":35,"tag":221,"props":1976,"children":1977},{"class":223,"line":30},[1978,1982,1986],{"type":35,"tag":221,"props":1979,"children":1980},{"style":1127},[1981],{"type":40,"value":76},{"type":35,"tag":221,"props":1983,"children":1984},{"style":1045},[1985],{"type":40,"value":962},{"type":35,"tag":221,"props":1987,"children":1988},{"style":1014},[1989],{"type":40,"value":1140},{"type":35,"tag":221,"props":1991,"children":1992},{"class":223,"line":312},[1993,1997],{"type":35,"tag":221,"props":1994,"children":1995},{"style":1146},[1996],{"type":40,"value":1687},{"type":35,"tag":221,"props":1998,"children":1999},{"style":1014},[2000],{"type":40,"value":1692},{"type":35,"tag":221,"props":2002,"children":2003},{"class":223,"line":1174},[2004,2008,2012,2017,2021],{"type":35,"tag":221,"props":2005,"children":2006},{"style":1146},[2007],{"type":40,"value":1700},{"type":35,"tag":221,"props":2009,"children":2010},{"style":1014},[2011],{"type":40,"value":1154},{"type":35,"tag":221,"props":2013,"children":2014},{"style":1157},[2015],{"type":40,"value":2016},"4",{"type":35,"tag":221,"props":2018,"children":2019},{"style":1163},[2020],{"type":40,"value":1713},{"type":35,"tag":221,"props":2022,"children":2023},{"style":1014},[2024],{"type":40,"value":1171},{"type":35,"tag":221,"props":2026,"children":2027},{"class":223,"line":28},[2028,2033,2037,2042],{"type":35,"tag":221,"props":2029,"children":2030},{"style":1146},[2031],{"type":40,"value":2032},"    animation-iteration-count",{"type":35,"tag":221,"props":2034,"children":2035},{"style":1014},[2036],{"type":40,"value":1154},{"type":35,"tag":221,"props":2038,"children":2039},{"style":1187},[2040],{"type":40,"value":2041},"infinite",{"type":35,"tag":221,"props":2043,"children":2044},{"style":1014},[2045],{"type":40,"value":1171},{"type":35,"tag":221,"props":2047,"children":2048},{"class":223,"line":1218},[2049,2053,2057,2061],{"type":35,"tag":221,"props":2050,"children":2051},{"style":1146},[2052],{"type":40,"value":1725},{"type":35,"tag":221,"props":2054,"children":2055},{"style":1014},[2056],{"type":40,"value":1154},{"type":35,"tag":221,"props":2058,"children":2059},{"style":1187},[2060],{"type":40,"value":1734},{"type":35,"tag":221,"props":2062,"children":2063},{"style":1014},[2064],{"type":40,"value":1171},{"type":35,"tag":221,"props":2066,"children":2067},{"class":223,"line":1239},[2068],{"type":35,"tag":221,"props":2069,"children":2070},{"style":1014},[2071],{"type":40,"value":1294},{"type":35,"tag":221,"props":2073,"children":2074},{"class":223,"line":1261},[2075],{"type":35,"tag":221,"props":2076,"children":2077},{"emptyLinePlaceholder":13},[2078],{"type":40,"value":1753},{"type":35,"tag":221,"props":2080,"children":2081},{"class":223,"line":1288},[2082,2086,2090,2094],{"type":35,"tag":221,"props":2083,"children":2084},{"style":1759},[2085],{"type":40,"value":1762},{"type":35,"tag":221,"props":2087,"children":2088},{"style":1765},[2089],{"type":40,"value":1768},{"type":35,"tag":221,"props":2091,"children":2092},{"style":1771},[2093],{"type":40,"value":1774},{"type":35,"tag":221,"props":2095,"children":2096},{"style":1014},[2097],{"type":40,"value":1140},{"type":35,"tag":221,"props":2099,"children":2100},{"class":223,"line":1548},[2101],{"type":35,"tag":221,"props":2102,"children":2103},{"style":1014},[2104],{"type":40,"value":2105},"  80%, 100% {\n",{"type":35,"tag":221,"props":2107,"children":2108},{"class":223,"line":1583},[2109,2114,2118,2122,2126,2130,2134],{"type":35,"tag":221,"props":2110,"children":2111},{"style":1146},[2112],{"type":40,"value":2113},"    transform",{"type":35,"tag":221,"props":2115,"children":2116},{"style":1014},[2117],{"type":40,"value":1154},{"type":35,"tag":221,"props":2119,"children":2120},{"style":1127},[2121],{"type":40,"value":1803},{"type":35,"tag":221,"props":2123,"children":2124},{"style":1014},[2125],{"type":40,"value":1363},{"type":35,"tag":221,"props":2127,"children":2128},{"style":1157},[2129],{"type":40,"value":1812},{"type":35,"tag":221,"props":2131,"children":2132},{"style":1163},[2133],{"type":40,"value":1817},{"type":35,"tag":221,"props":2135,"children":2136},{"style":1014},[2137],{"type":40,"value":1389},{"type":35,"tag":221,"props":2139,"children":2140},{"class":223,"line":1604},[2141],{"type":35,"tag":221,"props":2142,"children":2143},{"style":1014},[2144],{"type":40,"value":2145},"  }\n",{"type":35,"tag":221,"props":2147,"children":2148},{"class":223,"line":1626},[2149],{"type":35,"tag":221,"props":2150,"children":2151},{"style":1014},[2152],{"type":40,"value":2153},"  83%, 89%, 97% {\n",{"type":35,"tag":221,"props":2155,"children":2156},{"class":223,"line":1872},[2157,2161,2165,2169,2173,2177,2181],{"type":35,"tag":221,"props":2158,"children":2159},{"style":1146},[2160],{"type":40,"value":2113},{"type":35,"tag":221,"props":2162,"children":2163},{"style":1014},[2164],{"type":40,"value":1154},{"type":35,"tag":221,"props":2166,"children":2167},{"style":1127},[2168],{"type":40,"value":1803},{"type":35,"tag":221,"props":2170,"children":2171},{"style":1014},[2172],{"type":40,"value":1363},{"type":35,"tag":221,"props":2174,"children":2175},{"style":1157},[2176],{"type":40,"value":1861},{"type":35,"tag":221,"props":2178,"children":2179},{"style":1163},[2180],{"type":40,"value":1817},{"type":35,"tag":221,"props":2182,"children":2183},{"style":1014},[2184],{"type":40,"value":1389},{"type":35,"tag":221,"props":2186,"children":2187},{"class":223,"line":1880},[2188],{"type":35,"tag":221,"props":2189,"children":2190},{"style":1014},[2191],{"type":40,"value":2145},{"type":35,"tag":221,"props":2193,"children":2194},{"class":223,"line":1889},[2195],{"type":35,"tag":221,"props":2196,"children":2197},{"style":1014},[2198],{"type":40,"value":2199},"  86%, 93% {\n",{"type":35,"tag":221,"props":2201,"children":2202},{"class":223,"line":1922},[2203,2207,2211,2215,2219,2223,2227],{"type":35,"tag":221,"props":2204,"children":2205},{"style":1146},[2206],{"type":40,"value":2113},{"type":35,"tag":221,"props":2208,"children":2209},{"style":1014},[2210],{"type":40,"value":1154},{"type":35,"tag":221,"props":2212,"children":2213},{"style":1127},[2214],{"type":40,"value":1803},{"type":35,"tag":221,"props":2216,"children":2217},{"style":1014},[2218],{"type":40,"value":1363},{"type":35,"tag":221,"props":2220,"children":2221},{"style":1157},[2222],{"type":40,"value":1911},{"type":35,"tag":221,"props":2224,"children":2225},{"style":1163},[2226],{"type":40,"value":1817},{"type":35,"tag":221,"props":2228,"children":2229},{"style":1014},[2230],{"type":40,"value":1389},{"type":35,"tag":221,"props":2232,"children":2233},{"class":223,"line":1930},[2234],{"type":35,"tag":221,"props":2235,"children":2236},{"style":1014},[2237],{"type":40,"value":2145},{"type":35,"tag":221,"props":2239,"children":2241},{"class":223,"line":2240},19,[2242],{"type":35,"tag":221,"props":2243,"children":2244},{"style":1014},[2245],{"type":40,"value":1294},{"type":35,"tag":50,"props":2247,"children":2249},{"id":2248},"triggering-the-animation-on-event",[2250],{"type":40,"value":2251},"Triggering the animation on event",{"type":35,"tag":36,"props":2253,"children":2254},{},[2255],{"type":40,"value":2256},"Moving on, you probably would like to have that animation only on some custom event triggered by the user, for example\nyou want to animate some inputs after the user clicks a submit button and those fields fail the validation.",{"type":35,"tag":36,"props":2258,"children":2259},{},[2260,2262,2268,2270,2276,2278,2284],{"type":40,"value":2261},"For the demo purpose, let's create a new component using ",{"type":35,"tag":173,"props":2263,"children":2265},{"className":2264},[],[2266],{"type":40,"value":2267},"ng g c wiggle-css-click",{"type":40,"value":2269}," command. In the new component we will keep\nthe structure of the html file, but we need to handle the custom (click in our case) event and trigger the animation. So we\nwill attach the ",{"type":35,"tag":173,"props":2271,"children":2273},{"className":2272},[],[2274],{"type":40,"value":2275},"onWiggleClick()",{"type":40,"value":2277}," method and will create a template reference for the element to be animated ",{"type":35,"tag":173,"props":2279,"children":2281},{"className":2280},[],[2282],{"type":40,"value":2283},"#wiggleButton",{"type":40,"value":76},{"type":35,"tag":211,"props":2286,"children":2288},{"className":967,"code":2287,"language":969,"meta":8,"style":8},"\u003C!-- wiggle-css-click.component.html -->\n\u003Cdiv>On Click\u003C/div>\n\u003Cbutton \n    class=\"button\"\n    (click)=\"onWiggleClick()\"\n    #wiggleButton\n>\n    Click me!\n\u003C/button>\n",[2289],{"type":35,"tag":173,"props":2290,"children":2291},{"__ignoreMap":8},[2292,2308,2340,2356,2381,2405,2413,2420,2428],{"type":35,"tag":221,"props":2293,"children":2294},{"class":223,"line":224},[2295,2299,2304],{"type":35,"tag":221,"props":2296,"children":2297},{"style":790},[2298],{"type":40,"value":981},{"type":35,"tag":221,"props":2300,"children":2301},{"style":796},[2302],{"type":40,"value":2303}," wiggle-css-click.component.html ",{"type":35,"tag":221,"props":2305,"children":2306},{"style":790},[2307],{"type":40,"value":991},{"type":35,"tag":221,"props":2309,"children":2310},{"class":223,"line":30},[2311,2315,2319,2323,2328,2332,2336],{"type":35,"tag":221,"props":2312,"children":2313},{"style":997},[2314],{"type":40,"value":1000},{"type":35,"tag":221,"props":2316,"children":2317},{"style":1003},[2318],{"type":40,"value":1006},{"type":35,"tag":221,"props":2320,"children":2321},{"style":997},[2322],{"type":40,"value":1011},{"type":35,"tag":221,"props":2324,"children":2325},{"style":1014},[2326],{"type":40,"value":2327},"On Click",{"type":35,"tag":221,"props":2329,"children":2330},{"style":997},[2331],{"type":40,"value":1022},{"type":35,"tag":221,"props":2333,"children":2334},{"style":1003},[2335],{"type":40,"value":1006},{"type":35,"tag":221,"props":2337,"children":2338},{"style":997},[2339],{"type":40,"value":1031},{"type":35,"tag":221,"props":2341,"children":2342},{"class":223,"line":312},[2343,2347,2351],{"type":35,"tag":221,"props":2344,"children":2345},{"style":997},[2346],{"type":40,"value":1000},{"type":35,"tag":221,"props":2348,"children":2349},{"style":1003},[2350],{"type":40,"value":955},{"type":35,"tag":221,"props":2352,"children":2353},{"style":997},[2354],{"type":40,"value":2355}," \n",{"type":35,"tag":221,"props":2357,"children":2358},{"class":223,"line":1174},[2359,2364,2368,2372,2376],{"type":35,"tag":221,"props":2360,"children":2361},{"style":1045},[2362],{"type":40,"value":2363},"    class",{"type":35,"tag":221,"props":2365,"children":2366},{"style":997},[2367],{"type":40,"value":1053},{"type":35,"tag":221,"props":2369,"children":2370},{"style":1056},[2371],{"type":40,"value":1059},{"type":35,"tag":221,"props":2373,"children":2374},{"style":234},[2375],{"type":40,"value":955},{"type":35,"tag":221,"props":2377,"children":2378},{"style":1056},[2379],{"type":40,"value":2380},"\"\n",{"type":35,"tag":221,"props":2382,"children":2383},{"class":223,"line":28},[2384,2389,2393,2397,2401],{"type":35,"tag":221,"props":2385,"children":2386},{"style":1045},[2387],{"type":40,"value":2388},"    (click)",{"type":35,"tag":221,"props":2390,"children":2391},{"style":997},[2392],{"type":40,"value":1053},{"type":35,"tag":221,"props":2394,"children":2395},{"style":1056},[2396],{"type":40,"value":1059},{"type":35,"tag":221,"props":2398,"children":2399},{"style":234},[2400],{"type":40,"value":2275},{"type":35,"tag":221,"props":2402,"children":2403},{"style":1056},[2404],{"type":40,"value":2380},{"type":35,"tag":221,"props":2406,"children":2407},{"class":223,"line":1218},[2408],{"type":35,"tag":221,"props":2409,"children":2410},{"style":1045},[2411],{"type":40,"value":2412},"    #wiggleButton\n",{"type":35,"tag":221,"props":2414,"children":2415},{"class":223,"line":1239},[2416],{"type":35,"tag":221,"props":2417,"children":2418},{"style":997},[2419],{"type":40,"value":1031},{"type":35,"tag":221,"props":2421,"children":2422},{"class":223,"line":1261},[2423],{"type":35,"tag":221,"props":2424,"children":2425},{"style":1014},[2426],{"type":40,"value":2427},"    Click me!\n",{"type":35,"tag":221,"props":2429,"children":2430},{"class":223,"line":1288},[2431,2435,2439],{"type":35,"tag":221,"props":2432,"children":2433},{"style":997},[2434],{"type":40,"value":1022},{"type":35,"tag":221,"props":2436,"children":2437},{"style":1003},[2438],{"type":40,"value":955},{"type":35,"tag":221,"props":2440,"children":2441},{"style":997},[2442],{"type":40,"value":1031},{"type":35,"tag":36,"props":2444,"children":2445},{},[2446,2448,2454],{"type":40,"value":2447},"The css file will have the same structure as the initial option (with 1 second duration and running only once). In the typescript\ncomponent file we need to implement the logic for click handler method. What we need to do in order to trigger the animation\neach time is to remove it's class from the element and add it back. However, since this happens too fast, we need to adjust it\nwith a little trick, which is not the best one since you rely on a side effect. That side effect is to call the offset width on\nthe element itself between removing and adding the animation class. In order to reference the element we will use the ",{"type":35,"tag":173,"props":2449,"children":2451},{"className":2450},[],[2452],{"type":40,"value":2453},"ViewChild",{"type":40,"value":2455},"\ndecorator and manage the classes on its' native element property. The method will look like this:",{"type":35,"tag":211,"props":2457,"children":2461},{"className":2458,"code":2459,"language":2460,"meta":8,"style":8},"language-ts shiki shiki-themes night-owl","// wiggle-css-click.component.ts\nexport class WiggleCssClickComponent {\n  @ViewChild(\"wiggleButton\") wiggleButton! : ElementRef\u003CHTMLButtonElement>;\n\n  onWiggleClick() {\n    this.wiggleButton.nativeElement.classList.remove(\"wiggle\");\n    this.wiggleButton.nativeElement.offsetWidth;\n    this.wiggleButton.nativeElement.classList.add(\"wiggle\");\n  }\n}\n","ts",[2462],{"type":35,"tag":173,"props":2463,"children":2464},{"__ignoreMap":8},[2465,2478,2500,2563,2570,2587,2651,2688,2748,2755],{"type":35,"tag":221,"props":2466,"children":2467},{"class":223,"line":224},[2468,2473],{"type":35,"tag":221,"props":2469,"children":2470},{"style":790},[2471],{"type":40,"value":2472},"//",{"type":35,"tag":221,"props":2474,"children":2475},{"style":796},[2476],{"type":40,"value":2477}," wiggle-css-click.component.ts\n",{"type":35,"tag":221,"props":2479,"children":2480},{"class":223,"line":30},[2481,2486,2490,2496],{"type":35,"tag":221,"props":2482,"children":2483},{"style":1765},[2484],{"type":40,"value":2485},"export",{"type":35,"tag":221,"props":2487,"children":2488},{"style":1759},[2489],{"type":40,"value":1048},{"type":35,"tag":221,"props":2491,"children":2493},{"style":2492},"--shiki-default:#FFCB8B",[2494],{"type":40,"value":2495}," WiggleCssClickComponent",{"type":35,"tag":221,"props":2497,"children":2498},{"style":1014},[2499],{"type":40,"value":1140},{"type":35,"tag":221,"props":2501,"children":2502},{"class":223,"line":312},[2503,2508,2512,2516,2520,2525,2529,2534,2539,2544,2549,2553,2558],{"type":35,"tag":221,"props":2504,"children":2505},{"style":818},[2506],{"type":40,"value":2507},"  @",{"type":35,"tag":221,"props":2509,"children":2510},{"style":228},[2511],{"type":40,"value":2453},{"type":35,"tag":221,"props":2513,"children":2514},{"style":1014},[2515],{"type":40,"value":1363},{"type":35,"tag":221,"props":2517,"children":2518},{"style":1056},[2519],{"type":40,"value":1059},{"type":35,"tag":221,"props":2521,"children":2522},{"style":234},[2523],{"type":40,"value":2524},"wiggleButton",{"type":35,"tag":221,"props":2526,"children":2527},{"style":1056},[2528],{"type":40,"value":1059},{"type":35,"tag":221,"props":2530,"children":2531},{"style":1014},[2532],{"type":40,"value":2533},") wiggleButton",{"type":35,"tag":221,"props":2535,"children":2536},{"style":997},[2537],{"type":40,"value":2538},"!",{"type":35,"tag":221,"props":2540,"children":2541},{"style":997},[2542],{"type":40,"value":2543}," :",{"type":35,"tag":221,"props":2545,"children":2546},{"style":2492},[2547],{"type":40,"value":2548}," ElementRef",{"type":35,"tag":221,"props":2550,"children":2551},{"style":1014},[2552],{"type":40,"value":1000},{"type":35,"tag":221,"props":2554,"children":2555},{"style":2492},[2556],{"type":40,"value":2557},"HTMLButtonElement",{"type":35,"tag":221,"props":2559,"children":2560},{"style":1014},[2561],{"type":40,"value":2562},">;\n",{"type":35,"tag":221,"props":2564,"children":2565},{"class":223,"line":1174},[2566],{"type":35,"tag":221,"props":2567,"children":2568},{"emptyLinePlaceholder":13},[2569],{"type":40,"value":1753},{"type":35,"tag":221,"props":2571,"children":2572},{"class":223,"line":28},[2573,2578,2583],{"type":35,"tag":221,"props":2574,"children":2575},{"style":228},[2576],{"type":40,"value":2577},"  onWiggleClick",{"type":35,"tag":221,"props":2579,"children":2580},{"style":1056},[2581],{"type":40,"value":2582},"()",{"type":35,"tag":221,"props":2584,"children":2585},{"style":1014},[2586],{"type":40,"value":1140},{"type":35,"tag":221,"props":2588,"children":2589},{"class":223,"line":1218},[2590,2595,2599,2604,2608,2613,2617,2622,2626,2631,2635,2639,2643,2647],{"type":35,"tag":221,"props":2591,"children":2592},{"style":997},[2593],{"type":40,"value":2594},"    this",{"type":35,"tag":221,"props":2596,"children":2597},{"style":1765},[2598],{"type":40,"value":76},{"type":35,"tag":221,"props":2600,"children":2602},{"style":2601},"--shiki-default:#FAF39F;--shiki-default-font-style:italic",[2603],{"type":40,"value":2524},{"type":35,"tag":221,"props":2605,"children":2606},{"style":1765},[2607],{"type":40,"value":76},{"type":35,"tag":221,"props":2609,"children":2610},{"style":2601},[2611],{"type":40,"value":2612},"nativeElement",{"type":35,"tag":221,"props":2614,"children":2615},{"style":1765},[2616],{"type":40,"value":76},{"type":35,"tag":221,"props":2618,"children":2619},{"style":2601},[2620],{"type":40,"value":2621},"classList",{"type":35,"tag":221,"props":2623,"children":2624},{"style":1765},[2625],{"type":40,"value":76},{"type":35,"tag":221,"props":2627,"children":2628},{"style":228},[2629],{"type":40,"value":2630},"remove",{"type":35,"tag":221,"props":2632,"children":2633},{"style":1014},[2634],{"type":40,"value":1363},{"type":35,"tag":221,"props":2636,"children":2637},{"style":1056},[2638],{"type":40,"value":1059},{"type":35,"tag":221,"props":2640,"children":2641},{"style":234},[2642],{"type":40,"value":962},{"type":35,"tag":221,"props":2644,"children":2645},{"style":1056},[2646],{"type":40,"value":1059},{"type":35,"tag":221,"props":2648,"children":2649},{"style":1014},[2650],{"type":40,"value":1389},{"type":35,"tag":221,"props":2652,"children":2653},{"class":223,"line":1239},[2654,2658,2662,2666,2670,2674,2678,2684],{"type":35,"tag":221,"props":2655,"children":2656},{"style":997},[2657],{"type":40,"value":2594},{"type":35,"tag":221,"props":2659,"children":2660},{"style":1765},[2661],{"type":40,"value":76},{"type":35,"tag":221,"props":2663,"children":2664},{"style":2601},[2665],{"type":40,"value":2524},{"type":35,"tag":221,"props":2667,"children":2668},{"style":1765},[2669],{"type":40,"value":76},{"type":35,"tag":221,"props":2671,"children":2672},{"style":2601},[2673],{"type":40,"value":2612},{"type":35,"tag":221,"props":2675,"children":2676},{"style":1765},[2677],{"type":40,"value":76},{"type":35,"tag":221,"props":2679,"children":2681},{"style":2680},"--shiki-default:#BAEBE2",[2682],{"type":40,"value":2683},"offsetWidth",{"type":35,"tag":221,"props":2685,"children":2686},{"style":1014},[2687],{"type":40,"value":1171},{"type":35,"tag":221,"props":2689,"children":2690},{"class":223,"line":1261},[2691,2695,2699,2703,2707,2711,2715,2719,2723,2728,2732,2736,2740,2744],{"type":35,"tag":221,"props":2692,"children":2693},{"style":997},[2694],{"type":40,"value":2594},{"type":35,"tag":221,"props":2696,"children":2697},{"style":1765},[2698],{"type":40,"value":76},{"type":35,"tag":221,"props":2700,"children":2701},{"style":2601},[2702],{"type":40,"value":2524},{"type":35,"tag":221,"props":2704,"children":2705},{"style":1765},[2706],{"type":40,"value":76},{"type":35,"tag":221,"props":2708,"children":2709},{"style":2601},[2710],{"type":40,"value":2612},{"type":35,"tag":221,"props":2712,"children":2713},{"style":1765},[2714],{"type":40,"value":76},{"type":35,"tag":221,"props":2716,"children":2717},{"style":2601},[2718],{"type":40,"value":2621},{"type":35,"tag":221,"props":2720,"children":2721},{"style":1765},[2722],{"type":40,"value":76},{"type":35,"tag":221,"props":2724,"children":2725},{"style":228},[2726],{"type":40,"value":2727},"add",{"type":35,"tag":221,"props":2729,"children":2730},{"style":1014},[2731],{"type":40,"value":1363},{"type":35,"tag":221,"props":2733,"children":2734},{"style":1056},[2735],{"type":40,"value":1059},{"type":35,"tag":221,"props":2737,"children":2738},{"style":234},[2739],{"type":40,"value":962},{"type":35,"tag":221,"props":2741,"children":2742},{"style":1056},[2743],{"type":40,"value":1059},{"type":35,"tag":221,"props":2745,"children":2746},{"style":1014},[2747],{"type":40,"value":1389},{"type":35,"tag":221,"props":2749,"children":2750},{"class":223,"line":1288},[2751],{"type":35,"tag":221,"props":2752,"children":2753},{"style":1014},[2754],{"type":40,"value":2145},{"type":35,"tag":221,"props":2756,"children":2757},{"class":223,"line":1548},[2758],{"type":35,"tag":221,"props":2759,"children":2760},{"style":1014},[2761],{"type":40,"value":1294},{"type":35,"tag":50,"props":2763,"children":2765},{"id":2764},"css-and-angular-directives",[2766],{"type":40,"value":2767},"CSS and Angular Directives",{"type":35,"tag":36,"props":2769,"children":2770},{},[2771,2773,2778,2780,2786,2788,2793],{"type":40,"value":2772},"In Angular world, we can use another option to trigger the behaviour of our element. In this case we are limited only to the\nelement itself. We can use a ",{"type":35,"tag":83,"props":2774,"children":2775},{},[2776],{"type":40,"value":2777},"directive",{"type":40,"value":2779}," to attach the animation behaviour on button click. To generate a new directive we\nshould run the ",{"type":35,"tag":173,"props":2781,"children":2783},{"className":2782},[],[2784],{"type":40,"value":2785},"ng g d wiggle",{"type":40,"value":2787}," command. Inside the directive we need to get the element ref and then listen for the click event\nusing the ",{"type":35,"tag":83,"props":2789,"children":2790},{},[2791],{"type":40,"value":2792},"HostListener",{"type":40,"value":2794}," decorator. The method implementation remains the same as in the option above: we remove the animation\nclass, call the offsetWidth and then attach the class back. The directive class should look like this:",{"type":35,"tag":211,"props":2796,"children":2798},{"className":2458,"code":2797,"language":2460,"meta":8,"style":8},"// wiggle.directive.ts\nexport class WiggleDirective {\n  private el = inject(ElementRef);\n\n  @HostListener('click') onClick() {\n    this.el.nativeElement.classList.remove(\"wiggle\");\n    this.el.nativeElement.offsetWidth;\n    this.el.nativeElement.classList.add(\"wiggle\");\n  }\n}\n",[2799],{"type":35,"tag":173,"props":2800,"children":2801},{"__ignoreMap":8},[2802,2814,2834,2861,2868,2915,2975,3010,3069,3076],{"type":35,"tag":221,"props":2803,"children":2804},{"class":223,"line":224},[2805,2809],{"type":35,"tag":221,"props":2806,"children":2807},{"style":790},[2808],{"type":40,"value":2472},{"type":35,"tag":221,"props":2810,"children":2811},{"style":796},[2812],{"type":40,"value":2813}," wiggle.directive.ts\n",{"type":35,"tag":221,"props":2815,"children":2816},{"class":223,"line":30},[2817,2821,2825,2830],{"type":35,"tag":221,"props":2818,"children":2819},{"style":1765},[2820],{"type":40,"value":2485},{"type":35,"tag":221,"props":2822,"children":2823},{"style":1759},[2824],{"type":40,"value":1048},{"type":35,"tag":221,"props":2826,"children":2827},{"style":2492},[2828],{"type":40,"value":2829}," WiggleDirective",{"type":35,"tag":221,"props":2831,"children":2832},{"style":1014},[2833],{"type":40,"value":1140},{"type":35,"tag":221,"props":2835,"children":2836},{"class":223,"line":312},[2837,2842,2847,2851,2856],{"type":35,"tag":221,"props":2838,"children":2839},{"style":1765},[2840],{"type":40,"value":2841},"  private",{"type":35,"tag":221,"props":2843,"children":2844},{"style":1014},[2845],{"type":40,"value":2846}," el ",{"type":35,"tag":221,"props":2848,"children":2849},{"style":1759},[2850],{"type":40,"value":1053},{"type":35,"tag":221,"props":2852,"children":2853},{"style":228},[2854],{"type":40,"value":2855}," inject",{"type":35,"tag":221,"props":2857,"children":2858},{"style":1014},[2859],{"type":40,"value":2860},"(ElementRef);\n",{"type":35,"tag":221,"props":2862,"children":2863},{"class":223,"line":1174},[2864],{"type":35,"tag":221,"props":2865,"children":2866},{"emptyLinePlaceholder":13},[2867],{"type":40,"value":1753},{"type":35,"tag":221,"props":2869,"children":2870},{"class":223,"line":28},[2871,2875,2879,2883,2888,2893,2897,2902,2907,2911],{"type":35,"tag":221,"props":2872,"children":2873},{"style":818},[2874],{"type":40,"value":2507},{"type":35,"tag":221,"props":2876,"children":2877},{"style":228},[2878],{"type":40,"value":2792},{"type":35,"tag":221,"props":2880,"children":2881},{"style":1014},[2882],{"type":40,"value":1363},{"type":35,"tag":221,"props":2884,"children":2885},{"style":1056},[2886],{"type":40,"value":2887},"'",{"type":35,"tag":221,"props":2889,"children":2890},{"style":234},[2891],{"type":40,"value":2892},"click",{"type":35,"tag":221,"props":2894,"children":2895},{"style":1056},[2896],{"type":40,"value":2887},{"type":35,"tag":221,"props":2898,"children":2899},{"style":1014},[2900],{"type":40,"value":2901},") ",{"type":35,"tag":221,"props":2903,"children":2904},{"style":228},[2905],{"type":40,"value":2906},"onClick",{"type":35,"tag":221,"props":2908,"children":2909},{"style":1056},[2910],{"type":40,"value":2582},{"type":35,"tag":221,"props":2912,"children":2913},{"style":1014},[2914],{"type":40,"value":1140},{"type":35,"tag":221,"props":2916,"children":2917},{"class":223,"line":1218},[2918,2922,2926,2931,2935,2939,2943,2947,2951,2955,2959,2963,2967,2971],{"type":35,"tag":221,"props":2919,"children":2920},{"style":997},[2921],{"type":40,"value":2594},{"type":35,"tag":221,"props":2923,"children":2924},{"style":1765},[2925],{"type":40,"value":76},{"type":35,"tag":221,"props":2927,"children":2928},{"style":2601},[2929],{"type":40,"value":2930},"el",{"type":35,"tag":221,"props":2932,"children":2933},{"style":1765},[2934],{"type":40,"value":76},{"type":35,"tag":221,"props":2936,"children":2937},{"style":2601},[2938],{"type":40,"value":2612},{"type":35,"tag":221,"props":2940,"children":2941},{"style":1765},[2942],{"type":40,"value":76},{"type":35,"tag":221,"props":2944,"children":2945},{"style":2601},[2946],{"type":40,"value":2621},{"type":35,"tag":221,"props":2948,"children":2949},{"style":1765},[2950],{"type":40,"value":76},{"type":35,"tag":221,"props":2952,"children":2953},{"style":228},[2954],{"type":40,"value":2630},{"type":35,"tag":221,"props":2956,"children":2957},{"style":1014},[2958],{"type":40,"value":1363},{"type":35,"tag":221,"props":2960,"children":2961},{"style":1056},[2962],{"type":40,"value":1059},{"type":35,"tag":221,"props":2964,"children":2965},{"style":234},[2966],{"type":40,"value":962},{"type":35,"tag":221,"props":2968,"children":2969},{"style":1056},[2970],{"type":40,"value":1059},{"type":35,"tag":221,"props":2972,"children":2973},{"style":1014},[2974],{"type":40,"value":1389},{"type":35,"tag":221,"props":2976,"children":2977},{"class":223,"line":1239},[2978,2982,2986,2990,2994,2998,3002,3006],{"type":35,"tag":221,"props":2979,"children":2980},{"style":997},[2981],{"type":40,"value":2594},{"type":35,"tag":221,"props":2983,"children":2984},{"style":1765},[2985],{"type":40,"value":76},{"type":35,"tag":221,"props":2987,"children":2988},{"style":2601},[2989],{"type":40,"value":2930},{"type":35,"tag":221,"props":2991,"children":2992},{"style":1765},[2993],{"type":40,"value":76},{"type":35,"tag":221,"props":2995,"children":2996},{"style":2601},[2997],{"type":40,"value":2612},{"type":35,"tag":221,"props":2999,"children":3000},{"style":1765},[3001],{"type":40,"value":76},{"type":35,"tag":221,"props":3003,"children":3004},{"style":2680},[3005],{"type":40,"value":2683},{"type":35,"tag":221,"props":3007,"children":3008},{"style":1014},[3009],{"type":40,"value":1171},{"type":35,"tag":221,"props":3011,"children":3012},{"class":223,"line":1261},[3013,3017,3021,3025,3029,3033,3037,3041,3045,3049,3053,3057,3061,3065],{"type":35,"tag":221,"props":3014,"children":3015},{"style":997},[3016],{"type":40,"value":2594},{"type":35,"tag":221,"props":3018,"children":3019},{"style":1765},[3020],{"type":40,"value":76},{"type":35,"tag":221,"props":3022,"children":3023},{"style":2601},[3024],{"type":40,"value":2930},{"type":35,"tag":221,"props":3026,"children":3027},{"style":1765},[3028],{"type":40,"value":76},{"type":35,"tag":221,"props":3030,"children":3031},{"style":2601},[3032],{"type":40,"value":2612},{"type":35,"tag":221,"props":3034,"children":3035},{"style":1765},[3036],{"type":40,"value":76},{"type":35,"tag":221,"props":3038,"children":3039},{"style":2601},[3040],{"type":40,"value":2621},{"type":35,"tag":221,"props":3042,"children":3043},{"style":1765},[3044],{"type":40,"value":76},{"type":35,"tag":221,"props":3046,"children":3047},{"style":228},[3048],{"type":40,"value":2727},{"type":35,"tag":221,"props":3050,"children":3051},{"style":1014},[3052],{"type":40,"value":1363},{"type":35,"tag":221,"props":3054,"children":3055},{"style":1056},[3056],{"type":40,"value":1059},{"type":35,"tag":221,"props":3058,"children":3059},{"style":234},[3060],{"type":40,"value":962},{"type":35,"tag":221,"props":3062,"children":3063},{"style":1056},[3064],{"type":40,"value":1059},{"type":35,"tag":221,"props":3066,"children":3067},{"style":1014},[3068],{"type":40,"value":1389},{"type":35,"tag":221,"props":3070,"children":3071},{"class":223,"line":1288},[3072],{"type":35,"tag":221,"props":3073,"children":3074},{"style":1014},[3075],{"type":40,"value":2145},{"type":35,"tag":221,"props":3077,"children":3078},{"class":223,"line":1548},[3079],{"type":35,"tag":221,"props":3080,"children":3081},{"style":1014},[3082],{"type":40,"value":1294},{"type":35,"tag":36,"props":3084,"children":3085},{},[3086],{"type":40,"value":3087},"And then, in a new component, we have to use the directive on our button:",{"type":35,"tag":211,"props":3089,"children":3091},{"className":967,"code":3090,"language":969,"meta":8,"style":8},"\u003Cdiv>Directive\u003C/div>\n\u003Cbutton class=\"button\" appWiggle>Click me!\u003C/button>\n",[3092],{"type":35,"tag":173,"props":3093,"children":3094},{"__ignoreMap":8},[3095,3127],{"type":35,"tag":221,"props":3096,"children":3097},{"class":223,"line":224},[3098,3102,3106,3110,3115,3119,3123],{"type":35,"tag":221,"props":3099,"children":3100},{"style":997},[3101],{"type":40,"value":1000},{"type":35,"tag":221,"props":3103,"children":3104},{"style":1003},[3105],{"type":40,"value":1006},{"type":35,"tag":221,"props":3107,"children":3108},{"style":997},[3109],{"type":40,"value":1011},{"type":35,"tag":221,"props":3111,"children":3112},{"style":1014},[3113],{"type":40,"value":3114},"Directive",{"type":35,"tag":221,"props":3116,"children":3117},{"style":997},[3118],{"type":40,"value":1022},{"type":35,"tag":221,"props":3120,"children":3121},{"style":1003},[3122],{"type":40,"value":1006},{"type":35,"tag":221,"props":3124,"children":3125},{"style":997},[3126],{"type":40,"value":1031},{"type":35,"tag":221,"props":3128,"children":3129},{"class":223,"line":30},[3130,3134,3138,3142,3146,3150,3154,3158,3163,3167,3172,3176,3180],{"type":35,"tag":221,"props":3131,"children":3132},{"style":997},[3133],{"type":40,"value":1000},{"type":35,"tag":221,"props":3135,"children":3136},{"style":1003},[3137],{"type":40,"value":955},{"type":35,"tag":221,"props":3139,"children":3140},{"style":1045},[3141],{"type":40,"value":1048},{"type":35,"tag":221,"props":3143,"children":3144},{"style":997},[3145],{"type":40,"value":1053},{"type":35,"tag":221,"props":3147,"children":3148},{"style":1056},[3149],{"type":40,"value":1059},{"type":35,"tag":221,"props":3151,"children":3152},{"style":234},[3153],{"type":40,"value":955},{"type":35,"tag":221,"props":3155,"children":3156},{"style":1056},[3157],{"type":40,"value":1059},{"type":35,"tag":221,"props":3159,"children":3160},{"style":1045},[3161],{"type":40,"value":3162}," appWiggle",{"type":35,"tag":221,"props":3164,"children":3165},{"style":997},[3166],{"type":40,"value":1011},{"type":35,"tag":221,"props":3168,"children":3169},{"style":1014},[3170],{"type":40,"value":3171},"Click me!",{"type":35,"tag":221,"props":3173,"children":3174},{"style":997},[3175],{"type":40,"value":1022},{"type":35,"tag":221,"props":3177,"children":3178},{"style":1003},[3179],{"type":40,"value":955},{"type":35,"tag":221,"props":3181,"children":3182},{"style":997},[3183],{"type":40,"value":1031},{"type":35,"tag":50,"props":3185,"children":3187},{"id":3186},"angular-animations-two-states",[3188],{"type":40,"value":3189},"Angular Animations - Two states",{"type":35,"tag":36,"props":3191,"children":3192},{},[3193,3195,3201,3203,3208],{"type":40,"value":3194},"One great thing about angular is that it has its own animation package. We need to enable the animations first. In Angular 17\nstandalone mode we need to update the ",{"type":35,"tag":173,"props":3196,"children":3198},{"className":3197},[],[3199],{"type":40,"value":3200},"app.config.ts",{"type":40,"value":3202}," file and add ",{"type":35,"tag":83,"props":3204,"children":3205},{},[3206],{"type":40,"value":3207},"provideAnimations()",{"type":40,"value":3209}," (also import it at the top)\nto the providers array.",{"type":35,"tag":211,"props":3211,"children":3213},{"className":2458,"code":3212,"language":2460,"meta":8,"style":8},"import { provideAnimations } from '@angular/platform-browser/animations';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideAnimations()],\n};\n\n",[3214],{"type":35,"tag":173,"props":3215,"children":3216},{"__ignoreMap":8},[3217,3253,3260,3297,3329],{"type":35,"tag":221,"props":3218,"children":3219},{"class":223,"line":224},[3220,3225,3230,3235,3240,3245,3249],{"type":35,"tag":221,"props":3221,"children":3222},{"style":1765},[3223],{"type":40,"value":3224},"import",{"type":35,"tag":221,"props":3226,"children":3227},{"style":1014},[3228],{"type":40,"value":3229}," { provideAnimations } ",{"type":35,"tag":221,"props":3231,"children":3232},{"style":1765},[3233],{"type":40,"value":3234},"from",{"type":35,"tag":221,"props":3236,"children":3237},{"style":1056},[3238],{"type":40,"value":3239}," '",{"type":35,"tag":221,"props":3241,"children":3242},{"style":234},[3243],{"type":40,"value":3244},"@angular/platform-browser/animations",{"type":35,"tag":221,"props":3246,"children":3247},{"style":1056},[3248],{"type":40,"value":2887},{"type":35,"tag":221,"props":3250,"children":3251},{"style":1014},[3252],{"type":40,"value":1171},{"type":35,"tag":221,"props":3254,"children":3255},{"class":223,"line":30},[3256],{"type":35,"tag":221,"props":3257,"children":3258},{"emptyLinePlaceholder":13},[3259],{"type":40,"value":1753},{"type":35,"tag":221,"props":3261,"children":3262},{"class":223,"line":312},[3263,3268,3273,3278,3282,3288,3293],{"type":35,"tag":221,"props":3264,"children":3265},{"style":1765},[3266],{"type":40,"value":3267},"export ",{"type":35,"tag":221,"props":3269,"children":3270},{"style":1759},[3271],{"type":40,"value":3272},"const",{"type":35,"tag":221,"props":3274,"children":3275},{"style":228},[3276],{"type":40,"value":3277}," appConfig",{"type":35,"tag":221,"props":3279,"children":3280},{"style":997},[3281],{"type":40,"value":1130},{"type":35,"tag":221,"props":3283,"children":3285},{"style":3284},"--shiki-default:#FFCB8B;--shiki-default-font-style:italic",[3286],{"type":40,"value":3287}," ApplicationConfig",{"type":35,"tag":221,"props":3289,"children":3290},{"style":1759},[3291],{"type":40,"value":3292}," =",{"type":35,"tag":221,"props":3294,"children":3295},{"style":1759},[3296],{"type":40,"value":1140},{"type":35,"tag":221,"props":3298,"children":3299},{"class":223,"line":1174},[3300,3305,3309,3314,3319,3324],{"type":35,"tag":221,"props":3301,"children":3302},{"style":1765},[3303],{"type":40,"value":3304},"  providers",{"type":35,"tag":221,"props":3306,"children":3307},{"style":1759},[3308],{"type":40,"value":1130},{"type":35,"tag":221,"props":3310,"children":3311},{"style":1014},[3312],{"type":40,"value":3313}," [",{"type":35,"tag":221,"props":3315,"children":3316},{"style":228},[3317],{"type":40,"value":3318},"provideAnimations",{"type":35,"tag":221,"props":3320,"children":3321},{"style":1014},[3322],{"type":40,"value":3323},"()]",{"type":35,"tag":221,"props":3325,"children":3326},{"style":1759},[3327],{"type":40,"value":3328},",\n",{"type":35,"tag":221,"props":3330,"children":3331},{"class":223,"line":28},[3332,3337],{"type":35,"tag":221,"props":3333,"children":3334},{"style":1759},[3335],{"type":40,"value":3336},"}",{"type":35,"tag":221,"props":3338,"children":3339},{"style":1014},[3340],{"type":40,"value":1171},{"type":35,"tag":36,"props":3342,"children":3343},{},[3344,3346,3351],{"type":40,"value":3345},"That is it, now we can move on and configure our animations. We will create a new file and add a new property to the component\ndecorator - ",{"type":35,"tag":83,"props":3347,"children":3348},{},[3349],{"type":40,"value":3350},"animations",{"type":40,"value":76},{"type":35,"tag":211,"props":3353,"children":3355},{"className":2458,"code":3354,"language":2460,"meta":8,"style":8},"@Component({\n    ...,\n    animations: [],\n})\n",[3356],{"type":35,"tag":173,"props":3357,"children":3358},{"__ignoreMap":8},[3359,3376,3388,3396],{"type":35,"tag":221,"props":3360,"children":3361},{"class":223,"line":224},[3362,3366,3371],{"type":35,"tag":221,"props":3363,"children":3364},{"style":818},[3365],{"type":40,"value":1762},{"type":35,"tag":221,"props":3367,"children":3368},{"style":228},[3369],{"type":40,"value":3370},"Component",{"type":35,"tag":221,"props":3372,"children":3373},{"style":1014},[3374],{"type":40,"value":3375},"({\n",{"type":35,"tag":221,"props":3377,"children":3378},{"class":223,"line":30},[3379,3384],{"type":35,"tag":221,"props":3380,"children":3381},{"style":997},[3382],{"type":40,"value":3383},"    ...",{"type":35,"tag":221,"props":3385,"children":3386},{"style":1014},[3387],{"type":40,"value":3328},{"type":35,"tag":221,"props":3389,"children":3390},{"class":223,"line":312},[3391],{"type":35,"tag":221,"props":3392,"children":3393},{"style":1014},[3394],{"type":40,"value":3395},"    animations: [],\n",{"type":35,"tag":221,"props":3397,"children":3398},{"class":223,"line":1174},[3399],{"type":35,"tag":221,"props":3400,"children":3401},{"style":1014},[3402],{"type":40,"value":3403},"})\n",{"type":35,"tag":36,"props":3405,"children":3406},{},[3407,3409,3414,3416,3420],{"type":40,"value":3408},"Then we need to add a ",{"type":35,"tag":83,"props":3410,"children":3411},{},[3412],{"type":40,"value":3413},"trigger",{"type":40,"value":3415}," that will be attached to an element in the template, we'll call it ",{"type":35,"tag":624,"props":3417,"children":3418},{},[3419],{"type":40,"value":962},{"type":40,"value":76},{"type":35,"tag":211,"props":3422,"children":3424},{"className":2458,"code":3423,"language":2460,"meta":8,"style":8},"@Component({\n    ...,\n    animations: [\n        trigger('wiggle', []),\n    ],\n})\n",[3425],{"type":35,"tag":173,"props":3426,"children":3427},{"__ignoreMap":8},[3428,3443,3454,3462,3491,3499],{"type":35,"tag":221,"props":3429,"children":3430},{"class":223,"line":224},[3431,3435,3439],{"type":35,"tag":221,"props":3432,"children":3433},{"style":818},[3434],{"type":40,"value":1762},{"type":35,"tag":221,"props":3436,"children":3437},{"style":228},[3438],{"type":40,"value":3370},{"type":35,"tag":221,"props":3440,"children":3441},{"style":1014},[3442],{"type":40,"value":3375},{"type":35,"tag":221,"props":3444,"children":3445},{"class":223,"line":30},[3446,3450],{"type":35,"tag":221,"props":3447,"children":3448},{"style":997},[3449],{"type":40,"value":3383},{"type":35,"tag":221,"props":3451,"children":3452},{"style":1014},[3453],{"type":40,"value":3328},{"type":35,"tag":221,"props":3455,"children":3456},{"class":223,"line":312},[3457],{"type":35,"tag":221,"props":3458,"children":3459},{"style":1014},[3460],{"type":40,"value":3461},"    animations: [\n",{"type":35,"tag":221,"props":3463,"children":3464},{"class":223,"line":1174},[3465,3470,3474,3478,3482,3486],{"type":35,"tag":221,"props":3466,"children":3467},{"style":228},[3468],{"type":40,"value":3469},"        trigger",{"type":35,"tag":221,"props":3471,"children":3472},{"style":1014},[3473],{"type":40,"value":1363},{"type":35,"tag":221,"props":3475,"children":3476},{"style":1056},[3477],{"type":40,"value":2887},{"type":35,"tag":221,"props":3479,"children":3480},{"style":234},[3481],{"type":40,"value":962},{"type":35,"tag":221,"props":3483,"children":3484},{"style":1056},[3485],{"type":40,"value":2887},{"type":35,"tag":221,"props":3487,"children":3488},{"style":1014},[3489],{"type":40,"value":3490},", []),\n",{"type":35,"tag":221,"props":3492,"children":3493},{"class":223,"line":28},[3494],{"type":35,"tag":221,"props":3495,"children":3496},{"style":1014},[3497],{"type":40,"value":3498},"    ],\n",{"type":35,"tag":221,"props":3500,"children":3501},{"class":223,"line":1218},[3502],{"type":35,"tag":221,"props":3503,"children":3504},{"style":1014},[3505],{"type":40,"value":3403},{"type":35,"tag":36,"props":3507,"children":3508},{},[3509,3511,3516,3518,3523,3525,3530,3532,3537,3539,3544],{"type":40,"value":3510},"The trigger should define a set of ",{"type":35,"tag":83,"props":3512,"children":3513},{},[3514],{"type":40,"value":3515},"states",{"type":40,"value":3517}," and ",{"type":35,"tag":83,"props":3519,"children":3520},{},[3521],{"type":40,"value":3522},"transitions",{"type":40,"value":3524},". Initially we will create two states named ",{"type":35,"tag":624,"props":3526,"children":3527},{},[3528],{"type":40,"value":3529},"start",{"type":40,"value":3531}," and\n",{"type":35,"tag":624,"props":3533,"children":3534},{},[3535],{"type":40,"value":3536},"end",{"type":40,"value":3538},". These states will correspond to the 0% and 100% keyframes from the previous options, respectively. So, each of the states\nwill have a style with ",{"type":35,"tag":83,"props":3540,"children":3541},{},[3542],{"type":40,"value":3543},"rotate: 0deg",{"type":40,"value":76},{"type":35,"tag":211,"props":3546,"children":3548},{"className":2458,"code":3547,"language":2460,"meta":8,"style":8},"// wiggle-ng-animations-1.component.ts\n@Component({\n  ...,\n  animations: [\n    trigger('wiggle', [\n      state(\n        'start',\n        style({\n          rotate: '0deg',\n        })\n      ),\n      state(\n        'end',\n        style({\n          rotate: '0deg',\n        })\n      ),\n    ]),\n  ],\n})\n",[3549],{"type":35,"tag":173,"props":3550,"children":3551},{"__ignoreMap":8},[3552,3564,3579,3591,3599,3628,3641,3661,3673,3698,3706,3714,3725,3744,3755,3778,3785,3792,3800,3808],{"type":35,"tag":221,"props":3553,"children":3554},{"class":223,"line":224},[3555,3559],{"type":35,"tag":221,"props":3556,"children":3557},{"style":790},[3558],{"type":40,"value":2472},{"type":35,"tag":221,"props":3560,"children":3561},{"style":796},[3562],{"type":40,"value":3563}," wiggle-ng-animations-1.component.ts\n",{"type":35,"tag":221,"props":3565,"children":3566},{"class":223,"line":30},[3567,3571,3575],{"type":35,"tag":221,"props":3568,"children":3569},{"style":818},[3570],{"type":40,"value":1762},{"type":35,"tag":221,"props":3572,"children":3573},{"style":228},[3574],{"type":40,"value":3370},{"type":35,"tag":221,"props":3576,"children":3577},{"style":1014},[3578],{"type":40,"value":3375},{"type":35,"tag":221,"props":3580,"children":3581},{"class":223,"line":312},[3582,3587],{"type":35,"tag":221,"props":3583,"children":3584},{"style":997},[3585],{"type":40,"value":3586},"  ...",{"type":35,"tag":221,"props":3588,"children":3589},{"style":1014},[3590],{"type":40,"value":3328},{"type":35,"tag":221,"props":3592,"children":3593},{"class":223,"line":1174},[3594],{"type":35,"tag":221,"props":3595,"children":3596},{"style":1014},[3597],{"type":40,"value":3598},"  animations: [\n",{"type":35,"tag":221,"props":3600,"children":3601},{"class":223,"line":28},[3602,3607,3611,3615,3619,3623],{"type":35,"tag":221,"props":3603,"children":3604},{"style":228},[3605],{"type":40,"value":3606},"    trigger",{"type":35,"tag":221,"props":3608,"children":3609},{"style":1014},[3610],{"type":40,"value":1363},{"type":35,"tag":221,"props":3612,"children":3613},{"style":1056},[3614],{"type":40,"value":2887},{"type":35,"tag":221,"props":3616,"children":3617},{"style":234},[3618],{"type":40,"value":962},{"type":35,"tag":221,"props":3620,"children":3621},{"style":1056},[3622],{"type":40,"value":2887},{"type":35,"tag":221,"props":3624,"children":3625},{"style":1014},[3626],{"type":40,"value":3627},", [\n",{"type":35,"tag":221,"props":3629,"children":3630},{"class":223,"line":1218},[3631,3636],{"type":35,"tag":221,"props":3632,"children":3633},{"style":228},[3634],{"type":40,"value":3635},"      state",{"type":35,"tag":221,"props":3637,"children":3638},{"style":1014},[3639],{"type":40,"value":3640},"(\n",{"type":35,"tag":221,"props":3642,"children":3643},{"class":223,"line":1239},[3644,3649,3653,3657],{"type":35,"tag":221,"props":3645,"children":3646},{"style":1056},[3647],{"type":40,"value":3648},"        '",{"type":35,"tag":221,"props":3650,"children":3651},{"style":234},[3652],{"type":40,"value":3529},{"type":35,"tag":221,"props":3654,"children":3655},{"style":1056},[3656],{"type":40,"value":2887},{"type":35,"tag":221,"props":3658,"children":3659},{"style":1014},[3660],{"type":40,"value":3328},{"type":35,"tag":221,"props":3662,"children":3663},{"class":223,"line":1261},[3664,3669],{"type":35,"tag":221,"props":3665,"children":3666},{"style":228},[3667],{"type":40,"value":3668},"        style",{"type":35,"tag":221,"props":3670,"children":3671},{"style":1014},[3672],{"type":40,"value":3375},{"type":35,"tag":221,"props":3674,"children":3675},{"class":223,"line":1288},[3676,3681,3685,3690,3694],{"type":35,"tag":221,"props":3677,"children":3678},{"style":1014},[3679],{"type":40,"value":3680},"          rotate: ",{"type":35,"tag":221,"props":3682,"children":3683},{"style":1056},[3684],{"type":40,"value":2887},{"type":35,"tag":221,"props":3686,"children":3687},{"style":234},[3688],{"type":40,"value":3689},"0deg",{"type":35,"tag":221,"props":3691,"children":3692},{"style":1056},[3693],{"type":40,"value":2887},{"type":35,"tag":221,"props":3695,"children":3696},{"style":1014},[3697],{"type":40,"value":3328},{"type":35,"tag":221,"props":3699,"children":3700},{"class":223,"line":1548},[3701],{"type":35,"tag":221,"props":3702,"children":3703},{"style":1014},[3704],{"type":40,"value":3705},"        })\n",{"type":35,"tag":221,"props":3707,"children":3708},{"class":223,"line":1583},[3709],{"type":35,"tag":221,"props":3710,"children":3711},{"style":1014},[3712],{"type":40,"value":3713},"      ),\n",{"type":35,"tag":221,"props":3715,"children":3716},{"class":223,"line":1604},[3717,3721],{"type":35,"tag":221,"props":3718,"children":3719},{"style":228},[3720],{"type":40,"value":3635},{"type":35,"tag":221,"props":3722,"children":3723},{"style":1014},[3724],{"type":40,"value":3640},{"type":35,"tag":221,"props":3726,"children":3727},{"class":223,"line":1626},[3728,3732,3736,3740],{"type":35,"tag":221,"props":3729,"children":3730},{"style":1056},[3731],{"type":40,"value":3648},{"type":35,"tag":221,"props":3733,"children":3734},{"style":234},[3735],{"type":40,"value":3536},{"type":35,"tag":221,"props":3737,"children":3738},{"style":1056},[3739],{"type":40,"value":2887},{"type":35,"tag":221,"props":3741,"children":3742},{"style":1014},[3743],{"type":40,"value":3328},{"type":35,"tag":221,"props":3745,"children":3746},{"class":223,"line":1872},[3747,3751],{"type":35,"tag":221,"props":3748,"children":3749},{"style":228},[3750],{"type":40,"value":3668},{"type":35,"tag":221,"props":3752,"children":3753},{"style":1014},[3754],{"type":40,"value":3375},{"type":35,"tag":221,"props":3756,"children":3757},{"class":223,"line":1880},[3758,3762,3766,3770,3774],{"type":35,"tag":221,"props":3759,"children":3760},{"style":1014},[3761],{"type":40,"value":3680},{"type":35,"tag":221,"props":3763,"children":3764},{"style":1056},[3765],{"type":40,"value":2887},{"type":35,"tag":221,"props":3767,"children":3768},{"style":234},[3769],{"type":40,"value":3689},{"type":35,"tag":221,"props":3771,"children":3772},{"style":1056},[3773],{"type":40,"value":2887},{"type":35,"tag":221,"props":3775,"children":3776},{"style":1014},[3777],{"type":40,"value":3328},{"type":35,"tag":221,"props":3779,"children":3780},{"class":223,"line":1889},[3781],{"type":35,"tag":221,"props":3782,"children":3783},{"style":1014},[3784],{"type":40,"value":3705},{"type":35,"tag":221,"props":3786,"children":3787},{"class":223,"line":1922},[3788],{"type":35,"tag":221,"props":3789,"children":3790},{"style":1014},[3791],{"type":40,"value":3713},{"type":35,"tag":221,"props":3793,"children":3794},{"class":223,"line":1930},[3795],{"type":35,"tag":221,"props":3796,"children":3797},{"style":1014},[3798],{"type":40,"value":3799},"    ]),\n",{"type":35,"tag":221,"props":3801,"children":3802},{"class":223,"line":2240},[3803],{"type":35,"tag":221,"props":3804,"children":3805},{"style":1014},[3806],{"type":40,"value":3807},"  ],\n",{"type":35,"tag":221,"props":3809,"children":3811},{"class":223,"line":3810},20,[3812],{"type":35,"tag":221,"props":3813,"children":3814},{"style":1014},[3815],{"type":40,"value":3403},{"type":35,"tag":36,"props":3817,"children":3818},{},[3819,3821,3826],{"type":40,"value":3820},"Now that we have the states, we need to define an animation that will run whenever a state is changed between these two, thus the\nstate change expression will look like this: ",{"type":35,"tag":83,"props":3822,"children":3823},{},[3824],{"type":40,"value":3825},"'start \u003C=> end'",{"type":40,"value":3827}," (notice the \u003C=> symbol). For the transition we also have to\ndeclare the animation, which will run for 1 second in our case and will have an array of three keyframes, which will alternate styles\nbetween -10 degree rotation and 10 degree rotation at offset 0.25, 0.5 and 0.75. These offsets are an equivalent to keyframe percents\nin css and correspond to the point in time from the whole animation duration when the corresponding styles are applied.",{"type":35,"tag":211,"props":3829,"children":3831},{"className":2458,"code":3830,"language":2460,"meta":8,"style":8},"// wiggle-ng-animations-1.component.ts\n@Component({\n  ...,\n  animations: [\n    trigger('wiggle', [\n      // [states],\n      transition(\n        'start \u003C=> end',\n        animate(\n          '1s',\n          keyframes([\n            style({ rotate: '-10deg', offset: 0.25 }),\n            style({ rotate: '10deg', offset: 0.5 }),\n            style({ rotate: '-10deg', offset: 0.75 }),\n          ])\n        )\n      ),\n    ]),\n  ],\n})\n",[3832],{"type":35,"tag":173,"props":3833,"children":3834},{"__ignoreMap":8},[3835,3846,3861,3872,3879,3906,3919,3931,3951,3963,3984,3997,4038,4074,4110,4118,4126,4133,4140,4147],{"type":35,"tag":221,"props":3836,"children":3837},{"class":223,"line":224},[3838,3842],{"type":35,"tag":221,"props":3839,"children":3840},{"style":790},[3841],{"type":40,"value":2472},{"type":35,"tag":221,"props":3843,"children":3844},{"style":796},[3845],{"type":40,"value":3563},{"type":35,"tag":221,"props":3847,"children":3848},{"class":223,"line":30},[3849,3853,3857],{"type":35,"tag":221,"props":3850,"children":3851},{"style":818},[3852],{"type":40,"value":1762},{"type":35,"tag":221,"props":3854,"children":3855},{"style":228},[3856],{"type":40,"value":3370},{"type":35,"tag":221,"props":3858,"children":3859},{"style":1014},[3860],{"type":40,"value":3375},{"type":35,"tag":221,"props":3862,"children":3863},{"class":223,"line":312},[3864,3868],{"type":35,"tag":221,"props":3865,"children":3866},{"style":997},[3867],{"type":40,"value":3586},{"type":35,"tag":221,"props":3869,"children":3870},{"style":1014},[3871],{"type":40,"value":3328},{"type":35,"tag":221,"props":3873,"children":3874},{"class":223,"line":1174},[3875],{"type":35,"tag":221,"props":3876,"children":3877},{"style":1014},[3878],{"type":40,"value":3598},{"type":35,"tag":221,"props":3880,"children":3881},{"class":223,"line":28},[3882,3886,3890,3894,3898,3902],{"type":35,"tag":221,"props":3883,"children":3884},{"style":228},[3885],{"type":40,"value":3606},{"type":35,"tag":221,"props":3887,"children":3888},{"style":1014},[3889],{"type":40,"value":1363},{"type":35,"tag":221,"props":3891,"children":3892},{"style":1056},[3893],{"type":40,"value":2887},{"type":35,"tag":221,"props":3895,"children":3896},{"style":234},[3897],{"type":40,"value":962},{"type":35,"tag":221,"props":3899,"children":3900},{"style":1056},[3901],{"type":40,"value":2887},{"type":35,"tag":221,"props":3903,"children":3904},{"style":1014},[3905],{"type":40,"value":3627},{"type":35,"tag":221,"props":3907,"children":3908},{"class":223,"line":1218},[3909,3914],{"type":35,"tag":221,"props":3910,"children":3911},{"style":790},[3912],{"type":40,"value":3913},"      //",{"type":35,"tag":221,"props":3915,"children":3916},{"style":796},[3917],{"type":40,"value":3918}," [states],\n",{"type":35,"tag":221,"props":3920,"children":3921},{"class":223,"line":1239},[3922,3927],{"type":35,"tag":221,"props":3923,"children":3924},{"style":228},[3925],{"type":40,"value":3926},"      transition",{"type":35,"tag":221,"props":3928,"children":3929},{"style":1014},[3930],{"type":40,"value":3640},{"type":35,"tag":221,"props":3932,"children":3933},{"class":223,"line":1261},[3934,3938,3943,3947],{"type":35,"tag":221,"props":3935,"children":3936},{"style":1056},[3937],{"type":40,"value":3648},{"type":35,"tag":221,"props":3939,"children":3940},{"style":234},[3941],{"type":40,"value":3942},"start \u003C=> end",{"type":35,"tag":221,"props":3944,"children":3945},{"style":1056},[3946],{"type":40,"value":2887},{"type":35,"tag":221,"props":3948,"children":3949},{"style":1014},[3950],{"type":40,"value":3328},{"type":35,"tag":221,"props":3952,"children":3953},{"class":223,"line":1288},[3954,3959],{"type":35,"tag":221,"props":3955,"children":3956},{"style":228},[3957],{"type":40,"value":3958},"        animate",{"type":35,"tag":221,"props":3960,"children":3961},{"style":1014},[3962],{"type":40,"value":3640},{"type":35,"tag":221,"props":3964,"children":3965},{"class":223,"line":1548},[3966,3971,3976,3980],{"type":35,"tag":221,"props":3967,"children":3968},{"style":1056},[3969],{"type":40,"value":3970},"          '",{"type":35,"tag":221,"props":3972,"children":3973},{"style":234},[3974],{"type":40,"value":3975},"1s",{"type":35,"tag":221,"props":3977,"children":3978},{"style":1056},[3979],{"type":40,"value":2887},{"type":35,"tag":221,"props":3981,"children":3982},{"style":1014},[3983],{"type":40,"value":3328},{"type":35,"tag":221,"props":3985,"children":3986},{"class":223,"line":1583},[3987,3992],{"type":35,"tag":221,"props":3988,"children":3989},{"style":228},[3990],{"type":40,"value":3991},"          keyframes",{"type":35,"tag":221,"props":3993,"children":3994},{"style":1014},[3995],{"type":40,"value":3996},"([\n",{"type":35,"tag":221,"props":3998,"children":3999},{"class":223,"line":1604},[4000,4005,4010,4014,4019,4023,4028,4033],{"type":35,"tag":221,"props":4001,"children":4002},{"style":228},[4003],{"type":40,"value":4004},"            style",{"type":35,"tag":221,"props":4006,"children":4007},{"style":1014},[4008],{"type":40,"value":4009},"({ rotate: ",{"type":35,"tag":221,"props":4011,"children":4012},{"style":1056},[4013],{"type":40,"value":2887},{"type":35,"tag":221,"props":4015,"children":4016},{"style":234},[4017],{"type":40,"value":4018},"-10deg",{"type":35,"tag":221,"props":4020,"children":4021},{"style":1056},[4022],{"type":40,"value":2887},{"type":35,"tag":221,"props":4024,"children":4025},{"style":1014},[4026],{"type":40,"value":4027},", offset: ",{"type":35,"tag":221,"props":4029,"children":4030},{"style":1157},[4031],{"type":40,"value":4032},"0.25",{"type":35,"tag":221,"props":4034,"children":4035},{"style":1014},[4036],{"type":40,"value":4037}," }),\n",{"type":35,"tag":221,"props":4039,"children":4040},{"class":223,"line":1626},[4041,4045,4049,4053,4058,4062,4066,4070],{"type":35,"tag":221,"props":4042,"children":4043},{"style":228},[4044],{"type":40,"value":4004},{"type":35,"tag":221,"props":4046,"children":4047},{"style":1014},[4048],{"type":40,"value":4009},{"type":35,"tag":221,"props":4050,"children":4051},{"style":1056},[4052],{"type":40,"value":2887},{"type":35,"tag":221,"props":4054,"children":4055},{"style":234},[4056],{"type":40,"value":4057},"10deg",{"type":35,"tag":221,"props":4059,"children":4060},{"style":1056},[4061],{"type":40,"value":2887},{"type":35,"tag":221,"props":4063,"children":4064},{"style":1014},[4065],{"type":40,"value":4027},{"type":35,"tag":221,"props":4067,"children":4068},{"style":1157},[4069],{"type":40,"value":1563},{"type":35,"tag":221,"props":4071,"children":4072},{"style":1014},[4073],{"type":40,"value":4037},{"type":35,"tag":221,"props":4075,"children":4076},{"class":223,"line":1872},[4077,4081,4085,4089,4093,4097,4101,4106],{"type":35,"tag":221,"props":4078,"children":4079},{"style":228},[4080],{"type":40,"value":4004},{"type":35,"tag":221,"props":4082,"children":4083},{"style":1014},[4084],{"type":40,"value":4009},{"type":35,"tag":221,"props":4086,"children":4087},{"style":1056},[4088],{"type":40,"value":2887},{"type":35,"tag":221,"props":4090,"children":4091},{"style":234},[4092],{"type":40,"value":4018},{"type":35,"tag":221,"props":4094,"children":4095},{"style":1056},[4096],{"type":40,"value":2887},{"type":35,"tag":221,"props":4098,"children":4099},{"style":1014},[4100],{"type":40,"value":4027},{"type":35,"tag":221,"props":4102,"children":4103},{"style":1157},[4104],{"type":40,"value":4105},"0.75",{"type":35,"tag":221,"props":4107,"children":4108},{"style":1014},[4109],{"type":40,"value":4037},{"type":35,"tag":221,"props":4111,"children":4112},{"class":223,"line":1880},[4113],{"type":35,"tag":221,"props":4114,"children":4115},{"style":1014},[4116],{"type":40,"value":4117},"          ])\n",{"type":35,"tag":221,"props":4119,"children":4120},{"class":223,"line":1889},[4121],{"type":35,"tag":221,"props":4122,"children":4123},{"style":1014},[4124],{"type":40,"value":4125},"        )\n",{"type":35,"tag":221,"props":4127,"children":4128},{"class":223,"line":1922},[4129],{"type":35,"tag":221,"props":4130,"children":4131},{"style":1014},[4132],{"type":40,"value":3713},{"type":35,"tag":221,"props":4134,"children":4135},{"class":223,"line":1930},[4136],{"type":35,"tag":221,"props":4137,"children":4138},{"style":1014},[4139],{"type":40,"value":3799},{"type":35,"tag":221,"props":4141,"children":4142},{"class":223,"line":2240},[4143],{"type":35,"tag":221,"props":4144,"children":4145},{"style":1014},[4146],{"type":40,"value":3807},{"type":35,"tag":221,"props":4148,"children":4149},{"class":223,"line":3810},[4150],{"type":35,"tag":221,"props":4151,"children":4152},{"style":1014},[4153],{"type":40,"value":3403},{"type":35,"tag":36,"props":4155,"children":4156},{},[4157,4159,4163,4164,4168,4170,4175],{"type":40,"value":4158},"Finally, we need to control the states (",{"type":35,"tag":83,"props":4160,"children":4161},{},[4162],{"type":40,"value":3529},{"type":40,"value":3517},{"type":35,"tag":83,"props":4165,"children":4166},{},[4167],{"type":40,"value":3536},{"type":40,"value":4169},") in our component so that the animation take place. We\nwill declare a new component property and assign it one the two states and then create a ",{"type":35,"tag":83,"props":4171,"children":4172},{},[4173],{"type":40,"value":4174},"toggleWiggle()",{"type":40,"value":4176}," method to\nswitch the state to the other one.",{"type":35,"tag":211,"props":4178,"children":4180},{"className":2458,"code":4179,"language":2460,"meta":8,"style":8},"// wiggle-ng-animations-1.component.ts\n@Component({\n  selector: 'app-wiggle-ng-animations-1',\n  standalone: true,\n  imports: [],\n  templateUrl: './wiggle-ng-animations-1.component.html',\n  styleUrl: './wiggle-ng-animations-1.component.scss',\n  animations: [\n      // all triggers go here\n  ],\n})\nexport class WiggleNgAnimations1Component {\n  wiggle = 'start';\n\n  toggleWiggle() {\n    this.wiggle = this.wiggle == 'start' ? 'end' : 'start';\n  }\n}\n",[4181],{"type":35,"tag":173,"props":4182,"children":4183},{"__ignoreMap":8},[4184,4195,4210,4235,4253,4261,4286,4311,4318,4330,4337,4344,4364,4392,4399,4415,4501,4508],{"type":35,"tag":221,"props":4185,"children":4186},{"class":223,"line":224},[4187,4191],{"type":35,"tag":221,"props":4188,"children":4189},{"style":790},[4190],{"type":40,"value":2472},{"type":35,"tag":221,"props":4192,"children":4193},{"style":796},[4194],{"type":40,"value":3563},{"type":35,"tag":221,"props":4196,"children":4197},{"class":223,"line":30},[4198,4202,4206],{"type":35,"tag":221,"props":4199,"children":4200},{"style":818},[4201],{"type":40,"value":1762},{"type":35,"tag":221,"props":4203,"children":4204},{"style":228},[4205],{"type":40,"value":3370},{"type":35,"tag":221,"props":4207,"children":4208},{"style":1014},[4209],{"type":40,"value":3375},{"type":35,"tag":221,"props":4211,"children":4212},{"class":223,"line":312},[4213,4218,4222,4227,4231],{"type":35,"tag":221,"props":4214,"children":4215},{"style":1014},[4216],{"type":40,"value":4217},"  selector: ",{"type":35,"tag":221,"props":4219,"children":4220},{"style":1056},[4221],{"type":40,"value":2887},{"type":35,"tag":221,"props":4223,"children":4224},{"style":234},[4225],{"type":40,"value":4226},"app-wiggle-ng-animations-1",{"type":35,"tag":221,"props":4228,"children":4229},{"style":1056},[4230],{"type":40,"value":2887},{"type":35,"tag":221,"props":4232,"children":4233},{"style":1014},[4234],{"type":40,"value":3328},{"type":35,"tag":221,"props":4236,"children":4237},{"class":223,"line":1174},[4238,4243,4249],{"type":35,"tag":221,"props":4239,"children":4240},{"style":1014},[4241],{"type":40,"value":4242},"  standalone: ",{"type":35,"tag":221,"props":4244,"children":4246},{"style":4245},"--shiki-default:#FF5874",[4247],{"type":40,"value":4248},"true",{"type":35,"tag":221,"props":4250,"children":4251},{"style":1014},[4252],{"type":40,"value":3328},{"type":35,"tag":221,"props":4254,"children":4255},{"class":223,"line":28},[4256],{"type":35,"tag":221,"props":4257,"children":4258},{"style":1014},[4259],{"type":40,"value":4260},"  imports: [],\n",{"type":35,"tag":221,"props":4262,"children":4263},{"class":223,"line":1218},[4264,4269,4273,4278,4282],{"type":35,"tag":221,"props":4265,"children":4266},{"style":1014},[4267],{"type":40,"value":4268},"  templateUrl: ",{"type":35,"tag":221,"props":4270,"children":4271},{"style":1056},[4272],{"type":40,"value":2887},{"type":35,"tag":221,"props":4274,"children":4275},{"style":234},[4276],{"type":40,"value":4277},"./wiggle-ng-animations-1.component.html",{"type":35,"tag":221,"props":4279,"children":4280},{"style":1056},[4281],{"type":40,"value":2887},{"type":35,"tag":221,"props":4283,"children":4284},{"style":1014},[4285],{"type":40,"value":3328},{"type":35,"tag":221,"props":4287,"children":4288},{"class":223,"line":1239},[4289,4294,4298,4303,4307],{"type":35,"tag":221,"props":4290,"children":4291},{"style":1014},[4292],{"type":40,"value":4293},"  styleUrl: ",{"type":35,"tag":221,"props":4295,"children":4296},{"style":1056},[4297],{"type":40,"value":2887},{"type":35,"tag":221,"props":4299,"children":4300},{"style":234},[4301],{"type":40,"value":4302},"./wiggle-ng-animations-1.component.scss",{"type":35,"tag":221,"props":4304,"children":4305},{"style":1056},[4306],{"type":40,"value":2887},{"type":35,"tag":221,"props":4308,"children":4309},{"style":1014},[4310],{"type":40,"value":3328},{"type":35,"tag":221,"props":4312,"children":4313},{"class":223,"line":1261},[4314],{"type":35,"tag":221,"props":4315,"children":4316},{"style":1014},[4317],{"type":40,"value":3598},{"type":35,"tag":221,"props":4319,"children":4320},{"class":223,"line":1288},[4321,4325],{"type":35,"tag":221,"props":4322,"children":4323},{"style":790},[4324],{"type":40,"value":3913},{"type":35,"tag":221,"props":4326,"children":4327},{"style":796},[4328],{"type":40,"value":4329}," all triggers go here\n",{"type":35,"tag":221,"props":4331,"children":4332},{"class":223,"line":1548},[4333],{"type":35,"tag":221,"props":4334,"children":4335},{"style":1014},[4336],{"type":40,"value":3807},{"type":35,"tag":221,"props":4338,"children":4339},{"class":223,"line":1583},[4340],{"type":35,"tag":221,"props":4341,"children":4342},{"style":1014},[4343],{"type":40,"value":3403},{"type":35,"tag":221,"props":4345,"children":4346},{"class":223,"line":1604},[4347,4351,4355,4360],{"type":35,"tag":221,"props":4348,"children":4349},{"style":1765},[4350],{"type":40,"value":2485},{"type":35,"tag":221,"props":4352,"children":4353},{"style":1759},[4354],{"type":40,"value":1048},{"type":35,"tag":221,"props":4356,"children":4357},{"style":2492},[4358],{"type":40,"value":4359}," WiggleNgAnimations1Component",{"type":35,"tag":221,"props":4361,"children":4362},{"style":1014},[4363],{"type":40,"value":1140},{"type":35,"tag":221,"props":4365,"children":4366},{"class":223,"line":1626},[4367,4372,4376,4380,4384,4388],{"type":35,"tag":221,"props":4368,"children":4369},{"style":1014},[4370],{"type":40,"value":4371},"  wiggle ",{"type":35,"tag":221,"props":4373,"children":4374},{"style":1759},[4375],{"type":40,"value":1053},{"type":35,"tag":221,"props":4377,"children":4378},{"style":1056},[4379],{"type":40,"value":3239},{"type":35,"tag":221,"props":4381,"children":4382},{"style":234},[4383],{"type":40,"value":3529},{"type":35,"tag":221,"props":4385,"children":4386},{"style":1056},[4387],{"type":40,"value":2887},{"type":35,"tag":221,"props":4389,"children":4390},{"style":1014},[4391],{"type":40,"value":1171},{"type":35,"tag":221,"props":4393,"children":4394},{"class":223,"line":1872},[4395],{"type":35,"tag":221,"props":4396,"children":4397},{"emptyLinePlaceholder":13},[4398],{"type":40,"value":1753},{"type":35,"tag":221,"props":4400,"children":4401},{"class":223,"line":1880},[4402,4407,4411],{"type":35,"tag":221,"props":4403,"children":4404},{"style":228},[4405],{"type":40,"value":4406},"  toggleWiggle",{"type":35,"tag":221,"props":4408,"children":4409},{"style":1056},[4410],{"type":40,"value":2582},{"type":35,"tag":221,"props":4412,"children":4413},{"style":1014},[4414],{"type":40,"value":1140},{"type":35,"tag":221,"props":4416,"children":4417},{"class":223,"line":1889},[4418,4422,4426,4430,4434,4439,4443,4447,4452,4456,4460,4464,4469,4473,4477,4481,4485,4489,4493,4497],{"type":35,"tag":221,"props":4419,"children":4420},{"style":997},[4421],{"type":40,"value":2594},{"type":35,"tag":221,"props":4423,"children":4424},{"style":1765},[4425],{"type":40,"value":76},{"type":35,"tag":221,"props":4427,"children":4428},{"style":2680},[4429],{"type":40,"value":962},{"type":35,"tag":221,"props":4431,"children":4432},{"style":1759},[4433],{"type":40,"value":3292},{"type":35,"tag":221,"props":4435,"children":4436},{"style":997},[4437],{"type":40,"value":4438}," this",{"type":35,"tag":221,"props":4440,"children":4441},{"style":1765},[4442],{"type":40,"value":76},{"type":35,"tag":221,"props":4444,"children":4445},{"style":2680},[4446],{"type":40,"value":962},{"type":35,"tag":221,"props":4448,"children":4449},{"style":1759},[4450],{"type":40,"value":4451}," ==",{"type":35,"tag":221,"props":4453,"children":4454},{"style":1056},[4455],{"type":40,"value":3239},{"type":35,"tag":221,"props":4457,"children":4458},{"style":234},[4459],{"type":40,"value":3529},{"type":35,"tag":221,"props":4461,"children":4462},{"style":1056},[4463],{"type":40,"value":2887},{"type":35,"tag":221,"props":4465,"children":4466},{"style":1759},[4467],{"type":40,"value":4468}," ?",{"type":35,"tag":221,"props":4470,"children":4471},{"style":1056},[4472],{"type":40,"value":3239},{"type":35,"tag":221,"props":4474,"children":4475},{"style":234},[4476],{"type":40,"value":3536},{"type":35,"tag":221,"props":4478,"children":4479},{"style":1056},[4480],{"type":40,"value":2887},{"type":35,"tag":221,"props":4482,"children":4483},{"style":1759},[4484],{"type":40,"value":2543},{"type":35,"tag":221,"props":4486,"children":4487},{"style":1056},[4488],{"type":40,"value":3239},{"type":35,"tag":221,"props":4490,"children":4491},{"style":234},[4492],{"type":40,"value":3529},{"type":35,"tag":221,"props":4494,"children":4495},{"style":1056},[4496],{"type":40,"value":2887},{"type":35,"tag":221,"props":4498,"children":4499},{"style":1014},[4500],{"type":40,"value":1171},{"type":35,"tag":221,"props":4502,"children":4503},{"class":223,"line":1922},[4504],{"type":35,"tag":221,"props":4505,"children":4506},{"style":1014},[4507],{"type":40,"value":2145},{"type":35,"tag":221,"props":4509,"children":4510},{"class":223,"line":1930},[4511],{"type":35,"tag":221,"props":4512,"children":4513},{"style":1014},[4514],{"type":40,"value":1294},{"type":35,"tag":36,"props":4516,"children":4517},{},[4518,4520,4526],{"type":40,"value":4519},"Then in the template we need to attach the animation to the button using ",{"type":35,"tag":173,"props":4521,"children":4523},{"className":4522},[],[4524],{"type":40,"value":4525},"@ANIMATION_TRIGGER",{"type":40,"value":4527}," syntax and also react to\nclick event and toggle the state on the animation:",{"type":35,"tag":211,"props":4529,"children":4531},{"className":967,"code":4530,"language":969,"meta":8,"style":8},"\u003C!-- wiggle-ng-animations-1.component.html -->\n\u003Cdiv>Angular Animations Two States\u003C/div>\n\u003Cbutton\n  class=\"button\"\n  [@wiggle]=\"wiggle\"\n  (click)=\"toggleWiggle()\"\n>Click me!\u003C/button>\n",[4532],{"type":35,"tag":173,"props":4533,"children":4534},{"__ignoreMap":8},[4535,4551,4583,4595,4619,4643,4667],{"type":35,"tag":221,"props":4536,"children":4537},{"class":223,"line":224},[4538,4542,4547],{"type":35,"tag":221,"props":4539,"children":4540},{"style":790},[4541],{"type":40,"value":981},{"type":35,"tag":221,"props":4543,"children":4544},{"style":796},[4545],{"type":40,"value":4546}," wiggle-ng-animations-1.component.html ",{"type":35,"tag":221,"props":4548,"children":4549},{"style":790},[4550],{"type":40,"value":991},{"type":35,"tag":221,"props":4552,"children":4553},{"class":223,"line":30},[4554,4558,4562,4566,4571,4575,4579],{"type":35,"tag":221,"props":4555,"children":4556},{"style":997},[4557],{"type":40,"value":1000},{"type":35,"tag":221,"props":4559,"children":4560},{"style":1003},[4561],{"type":40,"value":1006},{"type":35,"tag":221,"props":4563,"children":4564},{"style":997},[4565],{"type":40,"value":1011},{"type":35,"tag":221,"props":4567,"children":4568},{"style":1014},[4569],{"type":40,"value":4570},"Angular Animations Two States",{"type":35,"tag":221,"props":4572,"children":4573},{"style":997},[4574],{"type":40,"value":1022},{"type":35,"tag":221,"props":4576,"children":4577},{"style":1003},[4578],{"type":40,"value":1006},{"type":35,"tag":221,"props":4580,"children":4581},{"style":997},[4582],{"type":40,"value":1031},{"type":35,"tag":221,"props":4584,"children":4585},{"class":223,"line":312},[4586,4590],{"type":35,"tag":221,"props":4587,"children":4588},{"style":997},[4589],{"type":40,"value":1000},{"type":35,"tag":221,"props":4591,"children":4592},{"style":1003},[4593],{"type":40,"value":4594},"button\n",{"type":35,"tag":221,"props":4596,"children":4597},{"class":223,"line":1174},[4598,4603,4607,4611,4615],{"type":35,"tag":221,"props":4599,"children":4600},{"style":1045},[4601],{"type":40,"value":4602},"  class",{"type":35,"tag":221,"props":4604,"children":4605},{"style":997},[4606],{"type":40,"value":1053},{"type":35,"tag":221,"props":4608,"children":4609},{"style":1056},[4610],{"type":40,"value":1059},{"type":35,"tag":221,"props":4612,"children":4613},{"style":234},[4614],{"type":40,"value":955},{"type":35,"tag":221,"props":4616,"children":4617},{"style":1056},[4618],{"type":40,"value":2380},{"type":35,"tag":221,"props":4620,"children":4621},{"class":223,"line":28},[4622,4627,4631,4635,4639],{"type":35,"tag":221,"props":4623,"children":4624},{"style":1045},[4625],{"type":40,"value":4626},"  [@wiggle]",{"type":35,"tag":221,"props":4628,"children":4629},{"style":997},[4630],{"type":40,"value":1053},{"type":35,"tag":221,"props":4632,"children":4633},{"style":1056},[4634],{"type":40,"value":1059},{"type":35,"tag":221,"props":4636,"children":4637},{"style":234},[4638],{"type":40,"value":962},{"type":35,"tag":221,"props":4640,"children":4641},{"style":1056},[4642],{"type":40,"value":2380},{"type":35,"tag":221,"props":4644,"children":4645},{"class":223,"line":1218},[4646,4651,4655,4659,4663],{"type":35,"tag":221,"props":4647,"children":4648},{"style":1045},[4649],{"type":40,"value":4650},"  (click)",{"type":35,"tag":221,"props":4652,"children":4653},{"style":997},[4654],{"type":40,"value":1053},{"type":35,"tag":221,"props":4656,"children":4657},{"style":1056},[4658],{"type":40,"value":1059},{"type":35,"tag":221,"props":4660,"children":4661},{"style":234},[4662],{"type":40,"value":4174},{"type":35,"tag":221,"props":4664,"children":4665},{"style":1056},[4666],{"type":40,"value":2380},{"type":35,"tag":221,"props":4668,"children":4669},{"class":223,"line":1239},[4670,4674,4678,4682,4686],{"type":35,"tag":221,"props":4671,"children":4672},{"style":997},[4673],{"type":40,"value":1011},{"type":35,"tag":221,"props":4675,"children":4676},{"style":1014},[4677],{"type":40,"value":3171},{"type":35,"tag":221,"props":4679,"children":4680},{"style":997},[4681],{"type":40,"value":1022},{"type":35,"tag":221,"props":4683,"children":4684},{"style":1003},[4685],{"type":40,"value":955},{"type":35,"tag":221,"props":4687,"children":4688},{"style":997},[4689],{"type":40,"value":1031},{"type":35,"tag":50,"props":4691,"children":4693},{"id":4692},"angular-animations-single-state",[4694],{"type":40,"value":4695},"Angular Animations - Single state",{"type":35,"tag":36,"props":4697,"children":4698},{},[4699,4701,4706],{"type":40,"value":4700},"Instead of using two states that store the same styles we can use only one and name it ",{"type":35,"tag":83,"props":4702,"children":4703},{},[4704],{"type":40,"value":4705},"default",{"type":40,"value":4707},". Afterward, when\ndeclaring the transition, for the state change expression we will use the wildcard (void) state as the initial and the default\nas we final state of the transition. We will keep the animate method and its keyframes.",{"type":35,"tag":211,"props":4709,"children":4711},{"className":2458,"code":4710,"language":2460,"meta":8,"style":8},"// wiggle-ng-animations-2.component.ts\n@Component({\n  ...,\n  animations: [\n    trigger('wiggle', [\n      state(\n        'default',\n        style({\n          rotate: '0deg',\n        })\n      ),\n      transition(\n        '* => default',\n        animate(\n          '1s',\n          keyframes([\n            style({ rotate: '-10deg', offset: 0.25 }),\n            style({ rotate: '10deg', offset: 0.5 }),\n            style({ rotate: '-10deg', offset: 0.75 }),\n          ])\n        )\n      ),\n    ]),\n  ],\n})\n",[4712],{"type":35,"tag":173,"props":4713,"children":4714},{"__ignoreMap":8},[4715,4727,4742,4753,4760,4787,4798,4817,4828,4851,4858,4865,4876,4896,4907,4926,4937,4972,5007,5042,5049,5057,5065,5073,5081],{"type":35,"tag":221,"props":4716,"children":4717},{"class":223,"line":224},[4718,4722],{"type":35,"tag":221,"props":4719,"children":4720},{"style":790},[4721],{"type":40,"value":2472},{"type":35,"tag":221,"props":4723,"children":4724},{"style":796},[4725],{"type":40,"value":4726}," wiggle-ng-animations-2.component.ts\n",{"type":35,"tag":221,"props":4728,"children":4729},{"class":223,"line":30},[4730,4734,4738],{"type":35,"tag":221,"props":4731,"children":4732},{"style":818},[4733],{"type":40,"value":1762},{"type":35,"tag":221,"props":4735,"children":4736},{"style":228},[4737],{"type":40,"value":3370},{"type":35,"tag":221,"props":4739,"children":4740},{"style":1014},[4741],{"type":40,"value":3375},{"type":35,"tag":221,"props":4743,"children":4744},{"class":223,"line":312},[4745,4749],{"type":35,"tag":221,"props":4746,"children":4747},{"style":997},[4748],{"type":40,"value":3586},{"type":35,"tag":221,"props":4750,"children":4751},{"style":1014},[4752],{"type":40,"value":3328},{"type":35,"tag":221,"props":4754,"children":4755},{"class":223,"line":1174},[4756],{"type":35,"tag":221,"props":4757,"children":4758},{"style":1014},[4759],{"type":40,"value":3598},{"type":35,"tag":221,"props":4761,"children":4762},{"class":223,"line":28},[4763,4767,4771,4775,4779,4783],{"type":35,"tag":221,"props":4764,"children":4765},{"style":228},[4766],{"type":40,"value":3606},{"type":35,"tag":221,"props":4768,"children":4769},{"style":1014},[4770],{"type":40,"value":1363},{"type":35,"tag":221,"props":4772,"children":4773},{"style":1056},[4774],{"type":40,"value":2887},{"type":35,"tag":221,"props":4776,"children":4777},{"style":234},[4778],{"type":40,"value":962},{"type":35,"tag":221,"props":4780,"children":4781},{"style":1056},[4782],{"type":40,"value":2887},{"type":35,"tag":221,"props":4784,"children":4785},{"style":1014},[4786],{"type":40,"value":3627},{"type":35,"tag":221,"props":4788,"children":4789},{"class":223,"line":1218},[4790,4794],{"type":35,"tag":221,"props":4791,"children":4792},{"style":228},[4793],{"type":40,"value":3635},{"type":35,"tag":221,"props":4795,"children":4796},{"style":1014},[4797],{"type":40,"value":3640},{"type":35,"tag":221,"props":4799,"children":4800},{"class":223,"line":1239},[4801,4805,4809,4813],{"type":35,"tag":221,"props":4802,"children":4803},{"style":1056},[4804],{"type":40,"value":3648},{"type":35,"tag":221,"props":4806,"children":4807},{"style":234},[4808],{"type":40,"value":4705},{"type":35,"tag":221,"props":4810,"children":4811},{"style":1056},[4812],{"type":40,"value":2887},{"type":35,"tag":221,"props":4814,"children":4815},{"style":1014},[4816],{"type":40,"value":3328},{"type":35,"tag":221,"props":4818,"children":4819},{"class":223,"line":1261},[4820,4824],{"type":35,"tag":221,"props":4821,"children":4822},{"style":228},[4823],{"type":40,"value":3668},{"type":35,"tag":221,"props":4825,"children":4826},{"style":1014},[4827],{"type":40,"value":3375},{"type":35,"tag":221,"props":4829,"children":4830},{"class":223,"line":1288},[4831,4835,4839,4843,4847],{"type":35,"tag":221,"props":4832,"children":4833},{"style":1014},[4834],{"type":40,"value":3680},{"type":35,"tag":221,"props":4836,"children":4837},{"style":1056},[4838],{"type":40,"value":2887},{"type":35,"tag":221,"props":4840,"children":4841},{"style":234},[4842],{"type":40,"value":3689},{"type":35,"tag":221,"props":4844,"children":4845},{"style":1056},[4846],{"type":40,"value":2887},{"type":35,"tag":221,"props":4848,"children":4849},{"style":1014},[4850],{"type":40,"value":3328},{"type":35,"tag":221,"props":4852,"children":4853},{"class":223,"line":1548},[4854],{"type":35,"tag":221,"props":4855,"children":4856},{"style":1014},[4857],{"type":40,"value":3705},{"type":35,"tag":221,"props":4859,"children":4860},{"class":223,"line":1583},[4861],{"type":35,"tag":221,"props":4862,"children":4863},{"style":1014},[4864],{"type":40,"value":3713},{"type":35,"tag":221,"props":4866,"children":4867},{"class":223,"line":1604},[4868,4872],{"type":35,"tag":221,"props":4869,"children":4870},{"style":228},[4871],{"type":40,"value":3926},{"type":35,"tag":221,"props":4873,"children":4874},{"style":1014},[4875],{"type":40,"value":3640},{"type":35,"tag":221,"props":4877,"children":4878},{"class":223,"line":1626},[4879,4883,4888,4892],{"type":35,"tag":221,"props":4880,"children":4881},{"style":1056},[4882],{"type":40,"value":3648},{"type":35,"tag":221,"props":4884,"children":4885},{"style":234},[4886],{"type":40,"value":4887},"* => default",{"type":35,"tag":221,"props":4889,"children":4890},{"style":1056},[4891],{"type":40,"value":2887},{"type":35,"tag":221,"props":4893,"children":4894},{"style":1014},[4895],{"type":40,"value":3328},{"type":35,"tag":221,"props":4897,"children":4898},{"class":223,"line":1872},[4899,4903],{"type":35,"tag":221,"props":4900,"children":4901},{"style":228},[4902],{"type":40,"value":3958},{"type":35,"tag":221,"props":4904,"children":4905},{"style":1014},[4906],{"type":40,"value":3640},{"type":35,"tag":221,"props":4908,"children":4909},{"class":223,"line":1880},[4910,4914,4918,4922],{"type":35,"tag":221,"props":4911,"children":4912},{"style":1056},[4913],{"type":40,"value":3970},{"type":35,"tag":221,"props":4915,"children":4916},{"style":234},[4917],{"type":40,"value":3975},{"type":35,"tag":221,"props":4919,"children":4920},{"style":1056},[4921],{"type":40,"value":2887},{"type":35,"tag":221,"props":4923,"children":4924},{"style":1014},[4925],{"type":40,"value":3328},{"type":35,"tag":221,"props":4927,"children":4928},{"class":223,"line":1889},[4929,4933],{"type":35,"tag":221,"props":4930,"children":4931},{"style":228},[4932],{"type":40,"value":3991},{"type":35,"tag":221,"props":4934,"children":4935},{"style":1014},[4936],{"type":40,"value":3996},{"type":35,"tag":221,"props":4938,"children":4939},{"class":223,"line":1922},[4940,4944,4948,4952,4956,4960,4964,4968],{"type":35,"tag":221,"props":4941,"children":4942},{"style":228},[4943],{"type":40,"value":4004},{"type":35,"tag":221,"props":4945,"children":4946},{"style":1014},[4947],{"type":40,"value":4009},{"type":35,"tag":221,"props":4949,"children":4950},{"style":1056},[4951],{"type":40,"value":2887},{"type":35,"tag":221,"props":4953,"children":4954},{"style":234},[4955],{"type":40,"value":4018},{"type":35,"tag":221,"props":4957,"children":4958},{"style":1056},[4959],{"type":40,"value":2887},{"type":35,"tag":221,"props":4961,"children":4962},{"style":1014},[4963],{"type":40,"value":4027},{"type":35,"tag":221,"props":4965,"children":4966},{"style":1157},[4967],{"type":40,"value":4032},{"type":35,"tag":221,"props":4969,"children":4970},{"style":1014},[4971],{"type":40,"value":4037},{"type":35,"tag":221,"props":4973,"children":4974},{"class":223,"line":1930},[4975,4979,4983,4987,4991,4995,4999,5003],{"type":35,"tag":221,"props":4976,"children":4977},{"style":228},[4978],{"type":40,"value":4004},{"type":35,"tag":221,"props":4980,"children":4981},{"style":1014},[4982],{"type":40,"value":4009},{"type":35,"tag":221,"props":4984,"children":4985},{"style":1056},[4986],{"type":40,"value":2887},{"type":35,"tag":221,"props":4988,"children":4989},{"style":234},[4990],{"type":40,"value":4057},{"type":35,"tag":221,"props":4992,"children":4993},{"style":1056},[4994],{"type":40,"value":2887},{"type":35,"tag":221,"props":4996,"children":4997},{"style":1014},[4998],{"type":40,"value":4027},{"type":35,"tag":221,"props":5000,"children":5001},{"style":1157},[5002],{"type":40,"value":1563},{"type":35,"tag":221,"props":5004,"children":5005},{"style":1014},[5006],{"type":40,"value":4037},{"type":35,"tag":221,"props":5008,"children":5009},{"class":223,"line":2240},[5010,5014,5018,5022,5026,5030,5034,5038],{"type":35,"tag":221,"props":5011,"children":5012},{"style":228},[5013],{"type":40,"value":4004},{"type":35,"tag":221,"props":5015,"children":5016},{"style":1014},[5017],{"type":40,"value":4009},{"type":35,"tag":221,"props":5019,"children":5020},{"style":1056},[5021],{"type":40,"value":2887},{"type":35,"tag":221,"props":5023,"children":5024},{"style":234},[5025],{"type":40,"value":4018},{"type":35,"tag":221,"props":5027,"children":5028},{"style":1056},[5029],{"type":40,"value":2887},{"type":35,"tag":221,"props":5031,"children":5032},{"style":1014},[5033],{"type":40,"value":4027},{"type":35,"tag":221,"props":5035,"children":5036},{"style":1157},[5037],{"type":40,"value":4105},{"type":35,"tag":221,"props":5039,"children":5040},{"style":1014},[5041],{"type":40,"value":4037},{"type":35,"tag":221,"props":5043,"children":5044},{"class":223,"line":3810},[5045],{"type":35,"tag":221,"props":5046,"children":5047},{"style":1014},[5048],{"type":40,"value":4117},{"type":35,"tag":221,"props":5050,"children":5052},{"class":223,"line":5051},21,[5053],{"type":35,"tag":221,"props":5054,"children":5055},{"style":1014},[5056],{"type":40,"value":4125},{"type":35,"tag":221,"props":5058,"children":5060},{"class":223,"line":5059},22,[5061],{"type":35,"tag":221,"props":5062,"children":5063},{"style":1014},[5064],{"type":40,"value":3713},{"type":35,"tag":221,"props":5066,"children":5068},{"class":223,"line":5067},23,[5069],{"type":35,"tag":221,"props":5070,"children":5071},{"style":1014},[5072],{"type":40,"value":3799},{"type":35,"tag":221,"props":5074,"children":5076},{"class":223,"line":5075},24,[5077],{"type":35,"tag":221,"props":5078,"children":5079},{"style":1014},[5080],{"type":40,"value":3807},{"type":35,"tag":221,"props":5082,"children":5084},{"class":223,"line":5083},25,[5085],{"type":35,"tag":221,"props":5086,"children":5087},{"style":1014},[5088],{"type":40,"value":3403},{"type":35,"tag":36,"props":5090,"children":5091},{},[5092,5094,5098,5100,5105],{"type":40,"value":5093},"In this case let's implement the 'toggle' logic directly in the template and reset the wiggle property to ",{"type":35,"tag":83,"props":5095,"children":5096},{},[5097],{"type":40,"value":4705},{"type":40,"value":5099},". Since\nthe animation transition is only one way, from void to default, we need to make sure that after the animation ends we reset the state\nback to void. This is why we need to listen for ",{"type":35,"tag":83,"props":5101,"children":5102},{},[5103],{"type":40,"value":5104},"@wiggle.done",{"type":40,"value":5106}," and attach a method that will be triggered when the event happens.",{"type":35,"tag":211,"props":5108,"children":5110},{"className":967,"code":5109,"language":969,"meta":8,"style":8},"\u003C!-- wiggle-ng-animations-2.component.html -->\n\u003Cdiv>Angular Animations Single State\u003C/div>\n\u003Cbutton\n  class=\"button\"\n  [@wiggle]=\"wiggle\"\n  (@wiggle.done)=\"onAnimationDone($event)\"\n  (click)=\"wiggle = 'default'\"\n>Click me!\u003C/button>\n",[5111],{"type":35,"tag":173,"props":5112,"children":5113},{"__ignoreMap":8},[5114,5130,5162,5173,5196,5219,5244,5268],{"type":35,"tag":221,"props":5115,"children":5116},{"class":223,"line":224},[5117,5121,5126],{"type":35,"tag":221,"props":5118,"children":5119},{"style":790},[5120],{"type":40,"value":981},{"type":35,"tag":221,"props":5122,"children":5123},{"style":796},[5124],{"type":40,"value":5125}," wiggle-ng-animations-2.component.html ",{"type":35,"tag":221,"props":5127,"children":5128},{"style":790},[5129],{"type":40,"value":991},{"type":35,"tag":221,"props":5131,"children":5132},{"class":223,"line":30},[5133,5137,5141,5145,5150,5154,5158],{"type":35,"tag":221,"props":5134,"children":5135},{"style":997},[5136],{"type":40,"value":1000},{"type":35,"tag":221,"props":5138,"children":5139},{"style":1003},[5140],{"type":40,"value":1006},{"type":35,"tag":221,"props":5142,"children":5143},{"style":997},[5144],{"type":40,"value":1011},{"type":35,"tag":221,"props":5146,"children":5147},{"style":1014},[5148],{"type":40,"value":5149},"Angular Animations Single State",{"type":35,"tag":221,"props":5151,"children":5152},{"style":997},[5153],{"type":40,"value":1022},{"type":35,"tag":221,"props":5155,"children":5156},{"style":1003},[5157],{"type":40,"value":1006},{"type":35,"tag":221,"props":5159,"children":5160},{"style":997},[5161],{"type":40,"value":1031},{"type":35,"tag":221,"props":5163,"children":5164},{"class":223,"line":312},[5165,5169],{"type":35,"tag":221,"props":5166,"children":5167},{"style":997},[5168],{"type":40,"value":1000},{"type":35,"tag":221,"props":5170,"children":5171},{"style":1003},[5172],{"type":40,"value":4594},{"type":35,"tag":221,"props":5174,"children":5175},{"class":223,"line":1174},[5176,5180,5184,5188,5192],{"type":35,"tag":221,"props":5177,"children":5178},{"style":1045},[5179],{"type":40,"value":4602},{"type":35,"tag":221,"props":5181,"children":5182},{"style":997},[5183],{"type":40,"value":1053},{"type":35,"tag":221,"props":5185,"children":5186},{"style":1056},[5187],{"type":40,"value":1059},{"type":35,"tag":221,"props":5189,"children":5190},{"style":234},[5191],{"type":40,"value":955},{"type":35,"tag":221,"props":5193,"children":5194},{"style":1056},[5195],{"type":40,"value":2380},{"type":35,"tag":221,"props":5197,"children":5198},{"class":223,"line":28},[5199,5203,5207,5211,5215],{"type":35,"tag":221,"props":5200,"children":5201},{"style":1045},[5202],{"type":40,"value":4626},{"type":35,"tag":221,"props":5204,"children":5205},{"style":997},[5206],{"type":40,"value":1053},{"type":35,"tag":221,"props":5208,"children":5209},{"style":1056},[5210],{"type":40,"value":1059},{"type":35,"tag":221,"props":5212,"children":5213},{"style":234},[5214],{"type":40,"value":962},{"type":35,"tag":221,"props":5216,"children":5217},{"style":1056},[5218],{"type":40,"value":2380},{"type":35,"tag":221,"props":5220,"children":5221},{"class":223,"line":1218},[5222,5227,5231,5235,5240],{"type":35,"tag":221,"props":5223,"children":5224},{"style":1045},[5225],{"type":40,"value":5226},"  (@wiggle.done)",{"type":35,"tag":221,"props":5228,"children":5229},{"style":997},[5230],{"type":40,"value":1053},{"type":35,"tag":221,"props":5232,"children":5233},{"style":1056},[5234],{"type":40,"value":1059},{"type":35,"tag":221,"props":5236,"children":5237},{"style":234},[5238],{"type":40,"value":5239},"onAnimationDone($event)",{"type":35,"tag":221,"props":5241,"children":5242},{"style":1056},[5243],{"type":40,"value":2380},{"type":35,"tag":221,"props":5245,"children":5246},{"class":223,"line":1239},[5247,5251,5255,5259,5264],{"type":35,"tag":221,"props":5248,"children":5249},{"style":1045},[5250],{"type":40,"value":4650},{"type":35,"tag":221,"props":5252,"children":5253},{"style":997},[5254],{"type":40,"value":1053},{"type":35,"tag":221,"props":5256,"children":5257},{"style":1056},[5258],{"type":40,"value":1059},{"type":35,"tag":221,"props":5260,"children":5261},{"style":234},[5262],{"type":40,"value":5263},"wiggle = 'default'",{"type":35,"tag":221,"props":5265,"children":5266},{"style":1056},[5267],{"type":40,"value":2380},{"type":35,"tag":221,"props":5269,"children":5270},{"class":223,"line":1261},[5271,5275,5279,5283,5287],{"type":35,"tag":221,"props":5272,"children":5273},{"style":997},[5274],{"type":40,"value":1011},{"type":35,"tag":221,"props":5276,"children":5277},{"style":1014},[5278],{"type":40,"value":3171},{"type":35,"tag":221,"props":5280,"children":5281},{"style":997},[5282],{"type":40,"value":1022},{"type":35,"tag":221,"props":5284,"children":5285},{"style":1003},[5286],{"type":40,"value":955},{"type":35,"tag":221,"props":5288,"children":5289},{"style":997},[5290],{"type":40,"value":1031},{"type":35,"tag":36,"props":5292,"children":5293},{},[5294,5296,5301,5303,5307],{"type":40,"value":5295},"The methods itself will check the 'toState' property on the ",{"type":35,"tag":83,"props":5297,"children":5298},{},[5299],{"type":40,"value":5300},"AnimationEvent",{"type":40,"value":5302}," and will reset it to an empty string if the\nstate is ",{"type":35,"tag":83,"props":5304,"children":5305},{},[5306],{"type":40,"value":4705},{"type":40,"value":5308}," - and this happens when the button is clicked.",{"type":35,"tag":211,"props":5310,"children":5312},{"className":2458,"code":5311,"language":2460,"meta":8,"style":8},"// wiggle-ng-animations-2.component.ts\nexport class WiggleNgAnimations2Component {\n  wiggle = '';\n\n  onAnimationDone(event: AnimationEvent): void {\n    if (event.toState === 'default') {\n      this.wiggle = ''; // Reset the state to trigger the animation again\n    }\n  }\n}\n",[5313],{"type":35,"tag":173,"props":5314,"children":5315},{"__ignoreMap":8},[5316,5327,5347,5367,5374,5418,5462,5500,5507,5514],{"type":35,"tag":221,"props":5317,"children":5318},{"class":223,"line":224},[5319,5323],{"type":35,"tag":221,"props":5320,"children":5321},{"style":790},[5322],{"type":40,"value":2472},{"type":35,"tag":221,"props":5324,"children":5325},{"style":796},[5326],{"type":40,"value":4726},{"type":35,"tag":221,"props":5328,"children":5329},{"class":223,"line":30},[5330,5334,5338,5343],{"type":35,"tag":221,"props":5331,"children":5332},{"style":1765},[5333],{"type":40,"value":2485},{"type":35,"tag":221,"props":5335,"children":5336},{"style":1759},[5337],{"type":40,"value":1048},{"type":35,"tag":221,"props":5339,"children":5340},{"style":2492},[5341],{"type":40,"value":5342}," WiggleNgAnimations2Component",{"type":35,"tag":221,"props":5344,"children":5345},{"style":1014},[5346],{"type":40,"value":1140},{"type":35,"tag":221,"props":5348,"children":5349},{"class":223,"line":312},[5350,5354,5358,5363],{"type":35,"tag":221,"props":5351,"children":5352},{"style":1014},[5353],{"type":40,"value":4371},{"type":35,"tag":221,"props":5355,"children":5356},{"style":1759},[5357],{"type":40,"value":1053},{"type":35,"tag":221,"props":5359,"children":5360},{"style":1056},[5361],{"type":40,"value":5362}," ''",{"type":35,"tag":221,"props":5364,"children":5365},{"style":1014},[5366],{"type":40,"value":1171},{"type":35,"tag":221,"props":5368,"children":5369},{"class":223,"line":1174},[5370],{"type":35,"tag":221,"props":5371,"children":5372},{"emptyLinePlaceholder":13},[5373],{"type":40,"value":1753},{"type":35,"tag":221,"props":5375,"children":5376},{"class":223,"line":28},[5377,5382,5386,5391,5395,5400,5405,5409,5414],{"type":35,"tag":221,"props":5378,"children":5379},{"style":228},[5380],{"type":40,"value":5381},"  onAnimationDone",{"type":35,"tag":221,"props":5383,"children":5384},{"style":1056},[5385],{"type":40,"value":1363},{"type":35,"tag":221,"props":5387,"children":5388},{"style":1771},[5389],{"type":40,"value":5390},"event",{"type":35,"tag":221,"props":5392,"children":5393},{"style":997},[5394],{"type":40,"value":1130},{"type":35,"tag":221,"props":5396,"children":5397},{"style":2492},[5398],{"type":40,"value":5399}," AnimationEvent",{"type":35,"tag":221,"props":5401,"children":5402},{"style":1056},[5403],{"type":40,"value":5404},")",{"type":35,"tag":221,"props":5406,"children":5407},{"style":997},[5408],{"type":40,"value":1130},{"type":35,"tag":221,"props":5410,"children":5411},{"style":1127},[5412],{"type":40,"value":5413}," void",{"type":35,"tag":221,"props":5415,"children":5416},{"style":1014},[5417],{"type":40,"value":1140},{"type":35,"tag":221,"props":5419,"children":5420},{"class":223,"line":1218},[5421,5426,5431,5435,5440,5445,5449,5453,5457],{"type":35,"tag":221,"props":5422,"children":5423},{"style":1759},[5424],{"type":40,"value":5425},"    if",{"type":35,"tag":221,"props":5427,"children":5428},{"style":1014},[5429],{"type":40,"value":5430}," (event",{"type":35,"tag":221,"props":5432,"children":5433},{"style":1765},[5434],{"type":40,"value":76},{"type":35,"tag":221,"props":5436,"children":5437},{"style":2680},[5438],{"type":40,"value":5439},"toState",{"type":35,"tag":221,"props":5441,"children":5442},{"style":1759},[5443],{"type":40,"value":5444}," ===",{"type":35,"tag":221,"props":5446,"children":5447},{"style":1056},[5448],{"type":40,"value":3239},{"type":35,"tag":221,"props":5450,"children":5451},{"style":234},[5452],{"type":40,"value":4705},{"type":35,"tag":221,"props":5454,"children":5455},{"style":1056},[5456],{"type":40,"value":2887},{"type":35,"tag":221,"props":5458,"children":5459},{"style":1014},[5460],{"type":40,"value":5461},") {\n",{"type":35,"tag":221,"props":5463,"children":5464},{"class":223,"line":1239},[5465,5470,5474,5478,5482,5486,5491,5495],{"type":35,"tag":221,"props":5466,"children":5467},{"style":997},[5468],{"type":40,"value":5469},"      this",{"type":35,"tag":221,"props":5471,"children":5472},{"style":1765},[5473],{"type":40,"value":76},{"type":35,"tag":221,"props":5475,"children":5476},{"style":2680},[5477],{"type":40,"value":962},{"type":35,"tag":221,"props":5479,"children":5480},{"style":1759},[5481],{"type":40,"value":3292},{"type":35,"tag":221,"props":5483,"children":5484},{"style":1056},[5485],{"type":40,"value":5362},{"type":35,"tag":221,"props":5487,"children":5488},{"style":1014},[5489],{"type":40,"value":5490},"; ",{"type":35,"tag":221,"props":5492,"children":5493},{"style":790},[5494],{"type":40,"value":2472},{"type":35,"tag":221,"props":5496,"children":5497},{"style":796},[5498],{"type":40,"value":5499}," Reset the state to trigger the animation again\n",{"type":35,"tag":221,"props":5501,"children":5502},{"class":223,"line":1261},[5503],{"type":35,"tag":221,"props":5504,"children":5505},{"style":1014},[5506],{"type":40,"value":1829},{"type":35,"tag":221,"props":5508,"children":5509},{"class":223,"line":1288},[5510],{"type":35,"tag":221,"props":5511,"children":5512},{"style":1014},[5513],{"type":40,"value":2145},{"type":35,"tag":221,"props":5515,"children":5516},{"class":223,"line":1548},[5517],{"type":35,"tag":221,"props":5518,"children":5519},{"style":1014},[5520],{"type":40,"value":1294},{"type":35,"tag":36,"props":5522,"children":5523},{},[5524],{"type":40,"value":5525},"That's pretty much it, we have a wiggle animation implemented in two ways (using plain CSS and Angular Animations).",{"type":35,"tag":50,"props":5527,"children":5529},{"id":5528},"source-code",[5530],{"type":40,"value":5531},"Source Code",{"type":35,"tag":36,"props":5533,"children":5534},{},[5535,5537,5543,5545,5550],{"type":40,"value":5536},"Wrapping everything together - you can check the source code on\n",{"type":35,"tag":67,"props":5538,"children":5541},{"href":5539,"target":5540},"https://gitlab.com/practical-frontend-content/wiggle-animation-angular","_blank",[5542],{"type":40,"value":589},{"type":40,"value":5544},"\nor\n",{"type":35,"tag":67,"props":5546,"children":5548},{"href":5547,"target":5540},"https://github.com/OwlHowl3/wiggle-animation-angular",[5549],{"type":40,"value":582},{"type":40,"value":5551},".\nFor a live demo you can check the Stackblitz project below.",{"type":35,"tag":302,"props":5553,"children":5554},{},[5555],{"type":40,"value":306},{"title":8,"searchDepth":30,"depth":30,"links":5557},[5558,5559,5560,5561,5562,5563],{"id":934,"depth":312,"text":937},{"id":2248,"depth":312,"text":2251},{"id":2764,"depth":312,"text":2767},{"id":3186,"depth":312,"text":3189},{"id":4692,"depth":312,"text":4695},{"id":5528,"depth":312,"text":5531},"content:articles:wiggle-animation.md","articles/wiggle-animation.md",1757847787082]