Noted: $location service is passed in to the controller as an argument. In order to use the service in the controller, it must be defined as a dependency.
Why use Services?
For many services, like the $location service, it seems like you could use objects that are already in the DOM, like the window.location object, and you could, but it would have some limitations, at least for your AngularJS application.
AngularJS constantly supervises your application, and for it to handle changes and events properly, AngularJS prefers that you use the $location service instead of the window.location object.
The $http Service
The $http service is one of the most common used services in AngularJS applications. The service makes a request to the server, and lets your application handle the response.
Use the $http service to request data from the server:
New York (CNN Business) A week ago, it'd be easy to dismiss foldable smartphones as a trend that never became a full-on fad. After all, Samsung's Galaxy Fold model, at nearly $2,000, famously broke for early reviewers, and the newly-launched $1,500 Motorola RAZR flip phone -- twice the cost of an iPhone 11 -- touts mostly lackluster features, including a small battery and plastic screen.
But Samsung's Galaxy Z Flip phone, announced Tuesday at a press event in San Francisco, could be the device that breathes new life into the buzzy concept that borrows heavily from designs of the past.
The 6.7-inch smartphone folds into a square about half its size, with a small rectangular display on the front cover for notifications. It comes in three colors — purple, black and gold — and goes on sale Friday February 14 in select stores and online.
At $1,380, the Z Flip is far from affordable, but with a new, sturdier design and almost as much computing power as the Samsung (SSNLF) flagship smartphone, the company could be onto something.
Galaxy Z Flip phone is seen at Samsung's Galaxy UNPACKED at The Palace of Fine Arts on February 11, 2020 in San Francisco, California. (Photo by Kelly Sullivan/Getty Images for Samsung Electronics America)
"After years of complacency in the smartphone market, waiting for some design innovation, there is little doubt that foldable smartphones are set to become the next technology innovation trend," said David McQueen, research director at tech advisory firm ABI Research. "Despite the obvious and immediate issues with getting them to market -- notably high barriers to entry, extreme hardware innovation, seamless user experiences and current eye-wateringly high prices -- foldable displays are set to become an important form factor in future product portfolios bringing much needed innovation into device design."
Beyond the nostalgia factor, there's a lot of appeal in a phone that shrinks in size and shuts close. At a time when smartphones light up and scream for us to grab them with each notification, snapping the device down is a refreshing change. (Like the RAZR, the Z Flip features a small display on the front so you can still see notifications come through if closed.)
Upon first impression, the Z Flip is the clear standout in the emerging foldable phone wars. Unlike the RAZR's plastic display, the Z Flip features a layer of ultra-thin glass that opens and snaps into place with ease. It packs a powerful processor and decent battery life and does most of what you'd expect from a smartphone these days. The Galaxy Z Flip stays true to its name by adopting the clamshell design typical of flip phones (the Galaxy Fold folded vertically outward, similar to a book).
The change to the hinge here is critical: It now features a small, internal brush-like system to push out debris and opens and snaps into place with ease. (Samsung claims it can open up to 200,000 times without damage.)
The downside of making the hinge horizontal, however, is a noticeable crease that resides in the center of the display, where users are often swiping and opening apps; you can both see it and feel it. It's a reminder that manufacturers are still trying to figure out how to approach the design. It's rumored that Apple could be working on a foldable concept, as well.
But for now, it's hard to get over the price -- something that will likely pigeonhole it as a niche product. It's only $20 less than the high-end Samsung Galaxy S20 Ultra, which boasts 5G capabilities, a super responsive touchscreen and an incredibly powerful set of cameras. Considering the Flip Z's price is $600 less than the Galaxy Fold, it signals Samsung is trying to figure out its place in the market.
Another key factor in determining the price is materials; the original Fold was basically two thin smartphones sandwiched on top of each other.
"This time it's one smartphone cut in half, so there are some price savings to be had," said Ramon Llamas, a director at research firm IDC. "Samsung continues to see an opportunity to differentiate itself in an otherwise copycat market and still make some money off of it. It already has the innovation chops and the manufacturing capabilities to do this themselves, and it's practically a category that it can claim as its own until foldables gain greater salience. That's a strong position for Samsung."
But could flip phones once again be the next big category of devices? For now, that may be a leap, but if executed correctly, Z Flip's "wow" factor will entice early adopters and eventually a larger audience. Get the price tag down to three digits, and things could get very interesting.
"For most consumers, phones have become predictable, boring and uninspiring. Standing out is not a bad thing," said Ben Stanton, senior analyst at tech market firm Canalys.
The Free Software Foundation wants Microsoft to keep Windows 7 alive as a free operating system. Microsoft stopped providing free security patches and support for Windows 7 earlier this month.
Although the popular operating system reached its 10th birthday last fall, some 200 million PCs around the globe still run it, according to industry estimates. Users include small business owners, some larger companies, government agencies, and hordes of consumers worldwide.
Microsoft expects most Windows 7 users to migrate to Windows 10, but it continues to provide patches and support for Windows 7 Pro and Enterprise, which are eligible for extended security update support for three years, for a fee. Windows 7 Home editions and Ultimate editions are not included in the options to purchase extended support.
The FSF this week launched the "Upcycle Windows 7" petition. The organization is still collecting signatures, though it has surpassed its goal of getting 7,777 people to sign on to make Windows 7 available for free. The current tally is approaching 10,000.
Making the OS free would allow users "the freedom to run, copy, distribute, study, change and improve the software," according to the foundation.
The petition makes no reference to who would maintain the free version with necessary patchs and continued upgrades, if any.
Making Windows 7 free could be viable, said Charles King, principal analyst at Pund-IT.
"At this point, the likelihood of converting current Windows 7 users to Windows 10 seems nil. Releasing the OS could earn Microsoft the goodwill of those users, and might lead to projects that would help ensure the continuing viability and security of Windows 7," he told LinuxInsider.
The petition's wording is to demand rather than simply ask that the company release Windows 7 as free software. The petition asserts that Microsoft ended "10 years of poisoning education, invading privacy, and threatening user security."
Windows 7's end of lifecycle gives Microsoft "the perfect opportunity to undo past wrongs, and to upcycle it instead," it states.
A precedent for releasing some core Windows utilities as free software already exists, according to the petition. So Microsoft would lose nothing "by liberating a version of their operating system that they themselves say has reached its end."
Microsoft released code for the Windows Calculator. So it can do the same for Windows 7, according to the foundation.
Also, Microsoft released MS-DOS five years ago as downloadable code. However, using it is limited to the terms of a noncommercial-use license agreement.
Given Microsoft's growing prominence in open source, and its ownership of GitHub, releasing the Windows 7 code as open source also could be beneficial to Microsoft.
It could be positioned as "putting our money where our mouth is," King noted. Many in the open source community would welcome that.
From Microsoft's perspective, releasing Windows 7 might not be as straightforward as one might expect. For typical consumers, Windows 7 already was free since it came bundled with their computers.
Microsoft is a for-profit company. That means it incurs costs to develop software for commercial use. The for-profit model is the foundation of the company, said Maryanne Steidinger, head of marketing for Webalo.
"IF they have no additional development costs -- services, support, troubleshooting -- around Windows 7, that might be a consideration to make it freeware, but then they should cut all support and let the market take the calls. I don't think anyone would want that," she told LinuxInsider.
The proprietary OS still has considerable market share to consider. Win 7's market share is expected to be 35 percent in 2020 and 28 percent in 2021, Steidinger added.
"So that endears users to keep it and maintain it," she said. "Because of the continuing market share and revenue generation for Windows 7, I think the company will say no."
It would be great if Microsoft released Windows 7 as freeware, but it is not a sure bet that the company will respond favorably to the petition, said Michael Arman, economic development director for the City of Oak Hill, Florida.
"Microsoft is not known for their charity, and there is plenty of code in Windows 7, which is used in 10 and in various other flavors of Microsoft's software. Why should they give that away when they can sell it?" he told LinuxInsider.
Corporate Signals is Mixed
Microsoft declined our request to comment on the FSF's petition.
However, over the last few years, Microsoft executives have suggested that open sourcing some of its software titles was not out of the question.
A future version of Windows released as open source was "definitely possible," Microsoft's Mark Russinovich said at ChefConf 2015 in Santa Clara, California.
Microsoft should release Windows 7 code under a free software license to prove that its love of open source software is not just a vehicle to "exploit users," the foundation argues in the petition.
The foundation did not respond to LinuxInsider's request for clarification on the petition.
Why Keep Working?
For government agencies, consumers, and businesses still using Windows 7, the main reason to keep Windows 7 alive is a no-brainer. "It just works" is the common battle cry.
Upon its introduction, Windows 7 was a very good, highly stable OS that corrected most of the mistakes Microsoft made with Vista, Pund-IT's King pointed out.
"It still fills the bill for numerous Windows and applications, so satisfied consumers and businesses see little if any reason to change. This has been a recurring issue for past Microsoft OSes, including Windows 3.1, NT and XP, and I expect it will continue so long as Microsoft remains an OS vendor," he said.
Some Windows 7 users go even further in their continued praise for the out-of-date OS. It still works with an assortment of equipment and software that may not be compatible with Windows 10.
"Everyone who uses it has more or less gotten it figured out and is comfortable with it," Oak Hill's Arman emphasized.
"There is also a HUGE installed base of Windows 7 software in business applications, and in many cases drivers for custom applications to interface with Windows 10 have not been written and may never be written," he said.
The ONLY thing "wrong" with Windows 7 is that Microsoft no longer supports it. That will make it increasingly vulnerable to malware, said Arman.
"If the machine is not connected to the Internet, there is NO reason to make the change," he added. "Windows 7 is now effectively out of warranty, such as it was. That doesn't mean it won't work."
Carpal tunnel, stiff shoulders, eye-strain headaches – these are all well-known side effects of prolonged computer use. But what happens when you step away from the desktop and into virtual reality?
A recent study from Oregon State University assessed how some common virtual reality movements contribute to muscle strain and discomfort. It’s an effort to ensure future user safety in this fast-growing technology that is used not only for gaming, but also increasingly for education and industrial training.
“There are no standards and guidelines for virtual and augmented reality interactions,” said researcher Jay Kim of OSU’S College of Public Health and Human Sciences. “We wanted to evaluate the effects of the target distances, locations, and sizes so we can better design these interfaces to reduce the risk for potential musculoskeletal injuries.”
The study was published recently in Applied Ergonomics with Northern Illinois University co-authors Sai Akhil Penumudi, Veera Aneesh Kuppam and Jaejin Hwang.
Virtual reality users wear a headset and engage in full-body, three-dimensional movements – unlike conventional computer users, where a desk or the arms of a chair offer some level of support for the hands and arms.
With sensors placed on participants’ joints and muscles, researchers used motion capture to record their movements and electromyography to measure electrical activity in their muscles while performing common VR gestures. Wearing an Oculus Rift VR headset, participants were tasked with either pointing to specific dots around a circle, or coloring in a certain area with their finger.
Researchers repeated the tests with the visuals placed at eye level, 15 degrees above eye level, 15 degrees below eye level and 30 degrees below eye level.
Regardless of the angle, extending the arm straight out causes shoulder discomfort in as little as three minutes, Kim said. With prolonged use, as VR often requires, this may lead to major health problems like gorilla arm syndrome and rotator cuff injuries.
In addition, the heavy VR headset may increase the burden on the cervical spine, risking greater neck strain.
In computer users, the relationship between awkward postures or repeated movements and musculoskeletal disorders is well known, Kim said. “We wanted to see how the VR compares to conventional computer-human interactions.”
The goal of the study was to establish a baseline of optimal object placement and angles, so VR developers going forward can design games and programs that minimize user discomfort.
Researchers focused on neck and shoulder movements. They found performance in the coloring task was worst when participants had to tilt their heads down 15 and 30 degrees. The most extreme postures and highest muscle activity were observed with targets at 15 degrees above eye level, as participants were forced to constantly maintain their extended neck and elevated arm position. And discomfort was greatest in the pointing task at 15 degrees above eye level.
“Based on this study, we recommend that objects that are being interacted with more often should be closer to the body,” Kim said. “And objects should be located at eye level, rather than up and down.”
The findings could have a massive impact, given VR’s growing demand: Tech analysts project that roughly 168 million people worldwide will have some form of VR installed by 2023. A major portion of users are gamers, but VR’s practical applications extend to health care, the military, education, and training. In coal mining, for example, trainees use VR to practice new skills that would be dangerous to learn on-site.
Kim’s main goal is to avoid the mistakes of the past. When personal computing was first emerging in the ’80s and ’90s, he said, people often didn’t think of the risks of overuse until it was too late.
With VR, he said, “We’d like to learn now rather than later.”
Reference: “The effects of target location on musculoskeletal load, task performance, and subjective discomfort during virtual reality interactions” by Sai Akhil Penumudi, Veera Aneesh Kuppam, Jeong Ho Kim and Jaejin Hwang, 27 November 2019, Applied Ergonomics.