angular/angular.js

View on GitHub
images/docs/guide/concepts.svg/injector-module.svg

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 756 553" width="63pc" height="553pt" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata> Produced by OmniGraffle 6.5.2 <dc:date>2013-11-06 19:46:59 +0000</dc:date></metadata><defs><font-face font-family="Courier" font-size="12" units-per-em="1000" underline-position="-178.22266" underline-thickness="57.617188" slope="0" x-height="462.40234" cap-height="594.72656" ascent="753.90625" descent="-246.09375" font-weight="500"><font-face-src><font-face-name name="Courier"/></font-face-src></font-face><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="522.94922" cap-height="717.28516" ascent="770.01953" descent="-229.98047" font-weight="500"><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M 8 0 L 0 -3 L 0 3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Arial" font-size="12" panose-1="2 11 7 4 2 2 2 2 2 4" units-per-em="1000" underline-position="-105.95703" underline-thickness="104.98047" slope="0" x-height="518.5547" cap-height="715.8203" ascent="905.27344" descent="-211.91406" font-weight="bold"><font-face-src><font-face-name name="Arial-BoldMT"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>injector-module</title><rect fill="white" width="756" height="553"/><g><title>Layer 1</title><path d="M 236.66669 103 L 519.33332 103 C 527.6176 103 534.33332 109.71573 534.33332 118 L 534.33332 342 C 534.33332 350.28427 527.6176 357 519.33332 357 L 236.66669 357 C 228.38242 357 221.66669 350.28427 221.66669 342 L 221.66669 118 C 221.66669 109.71573 228.38242 103 236.66669 103 Z" fill="#ececec"/><path d="M 236.66669 103 L 519.33332 103 C 527.6176 103 534.33332 109.71573 534.33332 118 L 534.33332 342 C 534.33332 350.28427 527.6176 357 519.33332 357 L 236.66669 357 C 228.38242 357 221.66669 350.28427 221.66669 342 L 221.66669 118 C 221.66669 109.71573 228.38242 103 236.66669 103 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5" stroke-dasharray="4,4"/><text transform="translate(226.66669 108)" fill="black"><tspan font-family="Courier" font-size="12" font-weight="500" x="0" y="11" textLength="122.41992">ng-app=&quot;myModule&quot;</tspan></text><path d="M 329.16669 210.8334 L 510.50002 210.8334 C 518.7843 210.8334 525.50002 217.54913 525.50002 225.8334 L 525.50002 251.16673 C 525.50002 259.451 518.7843 266.16673 510.50002 266.16673 L 329.16669 266.16673 C 320.88242 266.16673 314.16669 259.451 314.16669 251.16673 L 314.16669 225.8334 C 314.16669 217.54913 320.88242 210.8334 329.16669 210.8334 Z" fill="yellow" fill-opacity=".19"/><path d="M 329.16669 210.8334 L 510.50002 210.8334 C 518.7843 210.8334 525.50002 217.54913 525.50002 225.8334 L 525.50002 251.16673 C 525.50002 259.451 518.7843 266.16673 510.50002 266.16673 L 329.16669 266.16673 C 320.88242 266.16673 314.16669 259.451 314.16669 251.16673 L 314.16669 225.8334 C 314.16669 217.54913 320.88242 210.8334 329.16669 210.8334 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"/><text transform="translate(319.16669 231.50006)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x="0" y="11" textLength="45.357422">$injector</tspan></text><path d="M 466.16663 219.65106 L 497.16663 219.65106 C 505.4509 219.65106 512.16663 226.36679 512.16663 234.65106 L 512.16663 241.31773 C 512.16663 249.602 505.4509 256.31773 497.16663 256.31773 L 466.16663 256.31773 C 457.88236 256.31773 451.16663 249.602 451.16663 241.31773 L 451.16663 234.65106 C 451.16663 226.36679 457.88236 219.65106 466.16663 219.65106 Z" fill="#b1d6a2" fill-opacity=".75"/><path d="M 466.16663 219.65106 L 497.16663 219.65106 C 505.4509 219.65106 512.16663 226.36679 512.16663 234.65106 L 512.16663 241.31773 C 512.16663 249.602 505.4509 256.31773 497.16663 256.31773 L 466.16663 256.31773 C 457.88236 256.31773 451.16663 249.602 451.16663 241.31773 L 451.16663 234.65106 C 451.16663 226.36679 457.88236 219.65106 466.16663 219.65106 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"/><text transform="translate(456.16663 223.9844)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x="2.8183594" y="11" textLength="45.36328">Instance</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="5.4960938" y="25" textLength="40.007812">Factory</tspan></text><path d="M 393.16675 219.65106 L 424.16675 219.65106 C 432.45102 219.65106 439.16675 226.36679 439.16675 234.65106 L 439.16675 241.31773 C 439.16675 249.602 432.45102 256.31773 424.16675 256.31773 L 393.16675 256.31773 C 384.88248 256.31773 378.16675 249.602 378.16675 241.31773 L 378.16675 234.65106 C 378.16675 226.36679 384.88248 219.65106 393.16675 219.65106 Z" fill="#b1e1ff" fill-opacity=".75"/><path d="M 393.16675 219.65106 L 424.16675 219.65106 C 432.45102 219.65106 439.16675 226.36679 439.16675 234.65106 L 439.16675 241.31773 C 439.16675 249.602 432.45102 256.31773 424.16675 256.31773 L 393.16675 256.31773 C 384.88248 256.31773 378.16675 249.602 378.16675 241.31773 L 378.16675 234.65106 C 378.16675 226.36679 384.88248 219.65106 393.16675 219.65106 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"/><text transform="translate(383.16675 223.9844)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x="2.8183594" y="11" textLength="45.36328">Instance</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="8.15625" y="25" textLength="34.6875">Cache</tspan></text><line x1="344.5" y1="245.8334" x2="344.5" y2="342.1666" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="408.49994" y1="256.33328" x2="408.49994" y2="342.16656" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="483.49994" y1="256.33328" x2="483.49994" y2="342.16656" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="230.5" y1="283.16669" x2="334.6" y2="283.16669" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(239.82828 268.16644)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".017578125" y="11" textLength="45.357422">$injector</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="44.71875" y="11" textLength="39.263672">.get(&apos;a&apos;)</tspan></text><line x1="344.5" y1="298.16855" x2="398.26683" y2="298.45003" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(356.73212 271.65176)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".82617188" y="11" textLength="31.347656">check</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".4892578" y="25" textLength="32.021484">cache</tspan></text><line x1="409.16663" y1="319.31805" x2="471.93334" y2="319.47526" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(412.4164 292.73297)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".4814453" y="11" textLength="58.03711">if no cache</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".150390625" y="25" textLength="58.69922">create new</tspan></text><path d="M 386.66663 110.66663 L 511.73203 110.66663 C 520.0163 110.66663 526.73203 117.38236 526.73203 125.66663 L 526.73203 158 C 526.73203 166.28428 520.0163 173 511.73203 173 L 386.66663 173 C 378.38236 173 371.66663 166.28428 371.66663 158 L 371.66663 125.66663 C 371.66663 117.38236 378.38236 110.66663 386.66663 110.66663 Z" fill="#d7a5a5" fill-opacity=".75"/><path d="M 386.66663 110.66663 L 511.73203 110.66663 C 520.0163 110.66663 526.73203 117.38236 526.73203 125.66663 L 526.73203 158 C 526.73203 166.28428 520.0163 173 511.73203 173 L 386.66663 173 C 378.38236 173 371.66663 166.28428 371.66663 158 L 371.66663 125.66663 C 371.66663 117.38236 378.38236 110.66663 386.66663 110.66663 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"/><text transform="translate(376.66663 115.66663)" fill="black"><tspan font-family="Arial" font-size="12" font-weight="bold" x="0" y="11" textLength="59.33789">myModule</tspan><tspan font-family="Courier" font-size="12" font-weight="500" x="0" y="25.392578" textLength="64.810547">$provide.</tspan><tspan font-family="Courier" font-size="12" font-weight="500" x="0" y="39.392578" textLength="144.02344">  factory(&apos;objA&apos;, …)</tspan></text><line x1="438.24997" y1="173" x2="470.09483" y2="211.38014" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(456.3047 183.43733)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".31738281" y="11" textLength="25.347656">confi</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="25.665039" y="11" textLength="24.017578">gure</tspan></text><path d="M 308.49991 121.33264 C 317.66672 139 330.11225 143.38881 341.16672 143.66667 C 350.60189 143.90383 358.3793 144.2218 369.05667 131.045305" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>