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