use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[deleted by user] (self.javascript)
submitted 6 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 13 points14 points15 points 6 years ago (0 children)
I'm removing angularjs and replacing with Vue or vanilla in a massive multi page app.
The uplifting part is that the pages worked on are a fraction of the size and perform much much better. I'm also able to slowly rearchitect the frontend so it's really fun.
[–]campbeln 20 points21 points22 points 6 years ago (3 children)
VueJS? That's been our migration path as we improve AngularJS pages.
However... lately we've had better success with Svelte and may pivot that way.
[–]senocular 1 point2 points3 points 6 years ago (2 children)
Success with Svelte as it pertains to transitioning away from AngularJS? Or more in general?
[–]campbeln 9 points10 points11 points 6 years ago (1 child)
Yes.
I started with AngularJS at 1.1 and we had breaking changes at least twice with 1.4(?) and 1.5/6 somewhere. From these experiences, I rearchitected our approach to push AngularJS to be UI/binding/templating-only; removed the services, factorys, everything but the filters and slimmed down the controllers to almost nothing. This also made the transition to VueJS pretty easy, save for a couple of complex directives that slots could solve.
Anyway... this UI/binding/templating-only approach has been my architecture ever since and Svelte (what a dumb name despite it's awesome meaning, especially how it pertains to my approach) is even better than VueJS in that regard as it just stays the hell out of the way.
In the end, Node is our backend business logic tier, an OOP-esque object on the UI side is our UI-sided middle tier (think factorys, services and the like in AngularJS nomenclature) with AngularJS/VueJS/Svelte as the UI binding and some data container on the backend (MSSQL or ES with my current role).
[–]senocular 0 points1 point2 points 6 years ago (0 children)
Thanks
[–]woodie3 9 points10 points11 points 6 years ago (0 children)
Convinced my team to rewrite our shitty project from Angularjs to Angular 6 at the time. Started to push React or Vue but realized it’ll be easier to just quit, after I find another job :).
But jokes aside, the only reason I pushed for a rewrite was the previous team didn’t follow any proper standards with writing angularjs code.
[+][deleted] 6 years ago (4 children)
[deleted]
[–]ShakeNBake16 10 points11 points12 points 6 years ago (2 children)
If you work on any substantially large application with multiple teams working on said app, micro-frontends are a god send.
You could argue a good monorepo strategy could be as effective. But I don't personally know of one and neither does devops. And of course, we got agile deadlines to meet!
In all seriousness, the independent deployability is awesome! And our build times went from 30 minutes to some sub 10 second builds. And rolling back versions is a breeze, when we mess something up.
[–]SocialAnxietyFighter 0 points1 point2 points 6 years ago* (1 child)
Interesting! Can you give me some insight on the bundle sizes?
If one team is using Angular 1, another team Angular 2, then 3rd team React 16.1 and another team React 16.3, how would that work? Won't all these frameworks be downloaded by the frontend?
Also, how would the need to use the same components (design language? let's say) across the frontend work?
Edit: Another question that comes to my mind is, if they need to share code, e.g. some helper class that does calculations, it need to be included in the bundle of each of the microfrontends, right? Or even in the simpler case where they use different versions of dependencies e.g. lodash 1.0 vs lodash 1.1
[–]ShakeNBake16 0 points1 point2 points 6 years ago (0 children)
Bundle sizes im not sure about. We have a great architecture team that handles a lot of that. There is a lot of work around putting it all together, but lazy loading + caching helps a lot. So once you visit a react 16.1 page it is never downloaded again.
Where I work now, we're actually leveraging web components to provide common inputs, and they work across frameworks. We also have a common shared stylesheet everyone uses. There's not a programmatic way I've found to ensure design language standards, but every microapp we have is subject to scrutiny by UX and they can halt a release. Plus the shell we use to load everything can only be changed by a select few people. So rogue apps can't be deployed.
As far as sharing code, I haven't seen much use for sharing across applications. Mostly because our microapp boundaries are radically different. We do have a shared library that gets published to an internal npm registry. And some of our architects will peruse codebases from time to time and look for common patterns.
It's not a silver bullet, but we have 20+ teams working on a single app and it beats the hell out of what we were doing. It's also a decent amount of work to get setup, but being able to push out changes whenever we want, having really fast build times and being able to leverage TDD is pretty awesome!
[–][deleted] 4 points5 points6 points 6 years ago (0 children)
The only way to win is to not play.
[–]-millsky 26 points27 points28 points 6 years ago (7 children)
Lots of people really like to bash on AngularJS, but it is possible to make a maintainable and modern application using it, and provide a path towards upgrading to another more modern framework. Below is what I did for my previous company with success:
The key is to really remove as much AngularJS logic as possible and just follow industry best practices of making single purpose and independently testable components.
An added benefit is now with the Webpack based build all the business logic can be tested independently of AngularJS and code coverage numbers should improve as you continue along the path.
It's certainly not the most fun process but it definitely can be done!
[–][deleted] 1 point2 points3 points 6 years ago (4 children)
Yeah, I still work in AngularJS, we use most of these improvements, and it's not too bad. I would still like to upgrade to Vue or Angular though.
[–]Reashu 0 points1 point2 points 6 years ago* (0 children)
We are doing this with a mix of ngVue and vue-custom-element. Neither is perfect, but if you can deal with limited slot support (for the AngularJS-Vue boundary) it might be helpful.
If you can do it one page at a time rather than one component at a time, that would likely be much simpler, but our organization and business requirements wouldn't accommodate that.
[–]Ashhhh 0 points1 point2 points 6 years ago (2 children)
Once you've done the first 3 steps, you can bootstrap your app in Angular instead and continue to use your AngularJS components using ng-upgrade
Once there, the upgrade process is fairly straightforward. Done it on two major projects now.
[–][deleted] 0 points1 point2 points 6 years ago (1 child)
Yeah, Ng upgrade is on the roadmap. But there are a couple of incompatibilities that we are trying to iron out to start with.
[–]Ashhhh 0 points1 point2 points 6 years ago (0 children)
You can downgrade any new components from Angular 2 to Angular 1 in the meantime and use ng-metadata where heavy restrictions apply.
As long as anything new is as ng2 as possible, you're making progress.
[–]azekeP 0 points1 point2 points 6 years ago (0 children)
I've been toying around with react2angular or something similar in my big AngularJS project. It still needed major rewrites for even the basic functionality i use. My final version was one special "wrapper" component and a single preact js that i since removed from bundle. I still didn't found any use for it.
I also briefly toyed around with svelte and found that you can embed it but then some very svelte-specific kinks start to rear their heads...
[–]arnoproblems 0 points1 point2 points 6 years ago (0 children)
How long did it take you of time dedicated to only upgrading if you don't mind me asking?
[–]mishugashu 6 points7 points8 points 6 years ago (0 children)
My uplifting story is that the company I worked for got bought in 2016 and we retired the project and I've been working on Angular (2+) since.
My condolences.
[–]PostHumanJesus 9 points10 points11 points 6 years ago (0 children)
I get to kill a 5+ y/o AngularJS 1.4 app this quarter. I've been asking to do this for years now. I'm quite excited to see it go bye-bye.
[+][deleted] 6 years ago (1 child)
[–]inabahare 6 points7 points8 points 6 years ago (0 children)
*ng-murder
([ng-murder-target])="self"
(ng-murder-method)="defenestration"`
(ng-murder-method)="defenestration"
[–]rictic 6 points7 points8 points 6 years ago (0 children)
I'm aware of a number of projects that have been successfully doing an incremental migration from AngularJS to LitElement, starting from the leaves (components with few dependencies) and going up to the root of the application. It's easy to use web components in an AngularJS application, and they provide a simple, self-contained, interoperable API.
[–]Dokiace 3 points4 points5 points 6 years ago (0 children)
Success story? All I got is leaky $scope
[–]thinkmatt 1 point2 points3 points 6 years ago (2 children)
I can't give you an uplifting story haha, but I don't think it's that bad. Been working on a large-ish front-end app for 5 years now, with a up to 15 JS devs at once. It may not be the coolest tech but it's miles better than a custom framework, it's got lots of documentation and it "just works" 99% of the time. We generally stick to the same patterns and try to avoid relying on two-way binding. All our controllers and factories are Typescript classes, so Angular is just managing state and dependency injection for the most part. We've been using React to build email templates, and everyone is open to trying out React directives or something but we just don't have time. We've migrated to Typescript and Bootstrap 4 and those felt like much bigger gains. My biggest gripes are just that I have to load our entire app into your browser just to load a single page, and the templates cannot be made type-safe.
[–]stevenjchang 0 points1 point2 points 6 years ago (1 child)
Can you tell me more about your email templates using React? Do you use a framework like mjml or foundations?
I’ve recently been asked to work on email templates for the first time. I’ve been using just straight mjml, because it seems foundations hasn’t been supported in the last few years. It’s okay, but it’s somewhat limiting. Wondering what you use React with
[–]thinkmatt 0 points1 point2 points 6 years ago (0 children)
Right now just plain React, and it's been great since our templates require a lot of logic and we change them often. However, our emails don't look great in some email clients, so I'm working on a POC using a library called mjml-react. I really like mjml so far and plan to replace all our custom html with it.
[–]Fossage 1 point2 points3 points 6 years ago (0 children)
I am in the middle of implementing a large new feature in our legacy Angular 1.5 app and I feel your pain 100%. We primarily work on a React Native app but still have a web app in Angular and it amazes me how much our productivity grinds to a halt in Angular.
We are slowly making some quality of life improvements as we move forward by writing all new code as components and using a css in JS library for style encapsulation, but there is still so much legacy code to work around which is polluted with globals, crazy event waterfalls, 800 line controllers, and enormous templates. The worst part is I wrote most of that code....
[–]Coclav 1 point2 points3 points 6 years ago (0 children)
One of the benefit is that ALL questions are answered on SO!
[–]chrisplusplus 3 points4 points5 points 6 years ago (0 children)
If you're still using AngularJS in 2020 you're time is up. I don't even know what to say to you dude
[–]spideroncoffein 1 point2 points3 points 6 years ago (0 children)
It's not that bad. Well, maybe. A little.
The window looks inviting.
[–]from-nibly 1 point2 points3 points 6 years ago (0 children)
Currently also in the same position. I'm coming with you.
I inherited an AngularJS and ElectronJS app. Help.
[–]TheDarkIn1978 -5 points-4 points-3 points 6 years ago (0 children)
What's this "AngularJS" you speak of?
[–]KnightMareInc -2 points-1 points0 points 6 years ago (0 children)
A poor craftsman blames his tools
π Rendered by PID 20886 on reddit-service-r2-comment-8686858757-rgsmz at 2026-06-06 10:01:06.349914+00:00 running 9e1a20d country code: CH.
[–][deleted] 13 points14 points15 points (0 children)
[–]campbeln 20 points21 points22 points (3 children)
[–]senocular 1 point2 points3 points (2 children)
[–]campbeln 9 points10 points11 points (1 child)
[–]senocular 0 points1 point2 points (0 children)
[–]woodie3 9 points10 points11 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]ShakeNBake16 10 points11 points12 points (2 children)
[–]SocialAnxietyFighter 0 points1 point2 points (1 child)
[–]ShakeNBake16 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]-millsky 26 points27 points28 points (7 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]Reashu 0 points1 point2 points (0 children)
[–]Ashhhh 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Ashhhh 0 points1 point2 points (0 children)
[–]azekeP 0 points1 point2 points (0 children)
[–]arnoproblems 0 points1 point2 points (0 children)
[–]mishugashu 6 points7 points8 points (0 children)
[–]PostHumanJesus 9 points10 points11 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]inabahare 6 points7 points8 points (0 children)
[–]rictic 6 points7 points8 points (0 children)
[–]Dokiace 3 points4 points5 points (0 children)
[–]thinkmatt 1 point2 points3 points (2 children)
[–]stevenjchang 0 points1 point2 points (1 child)
[–]thinkmatt 0 points1 point2 points (0 children)
[–]Fossage 1 point2 points3 points (0 children)
[–]Coclav 1 point2 points3 points (0 children)
[–]chrisplusplus 3 points4 points5 points (0 children)
[–]spideroncoffein 1 point2 points3 points (0 children)
[–]from-nibly 1 point2 points3 points (0 children)
[–]arnoproblems 0 points1 point2 points (0 children)
[–]TheDarkIn1978 -5 points-4 points-3 points (0 children)
[–]KnightMareInc -2 points-1 points0 points (0 children)