Angular JS Learning

Angular JS Learning


$provide.provider, $provide.factory and $provide.service are
more or less the same thing in the sense that all of them are
blueprints / instructions for creating object instances (those
instances are then ready to be injected into collaborators).

$provide.provider is the most spohisticated method of registering
blueprints, it allows you to have a complex creation function and
configuration options.

$provide.factory is a simplified version of $provide.provider when you
don’t need to support configuration options but still want to have a
more sophisticated creation logic.

$provide.service is for cases where the whole creation logic boils
down to invoking a constructor function.

So, depending on the complexity of your construction logic you would
choose one of $provide.provider, $provide.factory and $provide.service
but in the end what you are going to get is a new instance.

Here is the jsFiddle showing different ways of constructing objects:


iis not returning .json file




The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. error when requesting json



By default, IIS in W2K3 and above won’t serve files that aren’t of a MIME type that it knows about (instead returning 404 errors).

You need to add a MIME type to IIS to allow it to serve that type of file. You can set it at the site level or at the server level.

To set this for the entire server:

  • Open the properties for the server in IIS Manager and click MIME Types
  • Click “New”. Enter “JSON” for the extension and “application/json” for the MIME type.



How to install visual studio 2012 extension in visual studio 2013


I have a extension that installs only in VS 2012 and not 2013, the reason for it is only that the developer were targeting only 2012, nothing else…

So I just wanted to change the manifest file:

To do this I used the VSIX Explorer:

To edit the manifest…All Done.

Decompiling Source


2 main options

  1. Reflector
    1. Not going to try this as I don’t have the license
    2. ReSharper
      3. You can also load entire folders into the Assembly Explorer by choosing File | Explore Folder.
      4. You can use the standalone tool dotPeek for this task. It uses the same technology as ReSharper.


Launch Git from Visual Studio


Tools -> External Tools -> Add New

Name: Git Bash

Command: c:\Program Files (x86)\git\bin\sh.exe

Args: –login –i

Initial Dit: $(SolutionDir)

Also Set a Shortcut for it if u want

Also Try:

Going a step beyond: use visual studio output window for git bash : DID NOT FIND ANY WAY TO DO THIS..

What got me excited was the option of “Reditect to o/p window” in the External Tools config above, but it doesn’t work…


Microsoft IT Institute

All Events:

Following modules and topics will be covered during this session:

Welcome to the Cloud at Microsoft Best Practice Experience: An overview of Microsoft IT, the Microsoft IT Institute, and the subject matter experts and technologies that will be explored in this session.

Charting the Cloud Landscape: A history of the cloud at Microsoft, cloud service delivery models: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service (SaaS); and Microsoft IT’s cloud value proposition.

Envision—Creating a Cloud Vision: Identifying stakeholders, assessing cloud readiness, taking inventory and categorizing applications in order to build a business case for cloud adoption. Participants will begin to create their own personal cloud deployment action plan and build upon it throughout the session through facilitated discussion with subject matter experts.

Enable—Strategy and Governance Planning for the Cloud: Choosing a cloud adoption approach, establishing governance, developing cloud policies, revamping processes, considering candidates for pilot projects, preparing the organization for cloud deployment and reviewing the Dev/Ops model.

Execute—Designing for the Cloud: Evaluating the infrastructure to determine the most appropriate architectural options (private, public, or hybrid models), designing secure solutions and architectural standards around testing, monitoring, scaling, redundancy and latency; determining strategies for integrating cloud-based applications with on-premises applications.

Execute—Deploying to the Cloud: Implementing and integrating cloud-based solutions, identity and data management, integration and standards, and testing.

Execute—Operating in the Cloud: Assessing the operational impact of cloud-based solutions on support; application management, monitoring, synchronization, business continuity and disaster recovery including some insight into Microsoft IT’s progress in the IaaS space.

Execute—Managing Cloud Services: Reviewing the financial impact of cloud adoption; determining metrics; managing growth and transformation; and measuring efficiency, agility and quality of service.

In additional to the modules above, you will hear from each of our subject matter experts throughout the session describing “What’s Next” for Microsoft in the cloud. Some modules also include a case study or demonstration relevant to the topic to help provide additional insight into “How Microsoft Does IT”.




  1. Ctrl + , : Navigate to anything
  2. Move lines: place carot on line (or select multiple or collapse regio)and alt up or down key to move code
  3. Align Assignments: Aligns assignment statements by typing Ctrl+Alt+].
  4. @ in Quick launch menu
  5. BEST: hide the Menu Bar using VSCommands options
  6. Html or cshtml file: html5 then tab scaffolds
  7. Less file create and see css in parallel
  8. Browserlink enhancemnets using web extensions like auto refresh, design mode etc.
  9. PASTE FROM CLIPBOARD: ctrl + shift + v


Productivity Power Tools:

New additions to Productivity Power Tools 2013:

  1. Peek Help
  2. Solution Explorer Errors
  3. Structure Visualizer
  4. Double click to maximize windows
  5. Timestamp margin
  6. Quick tasks – Edit Present On
  7. Ctrl + Click to Peek Definition`
  8. HTML Copy improvements
  9. Recently Closed Documents
  10. Match Margin
  11. Power Commands context menu cleanup
  12. 12.   Other features:
  13. Quick Tasks
  14. Power Commands
  15. Color printing
  16. Middle-Click Scrolling
  17. Organize Imports for Visual Basic
  18. Custom Document Well
  19. Tools Options Support
  20. HTML Copy
  21. Fix Mixed Tabs
  22. Ctrl + Click Go To Definition
  23. Align Assignments
  24. Column Guides
  25. Colorized Parameter Help