Created
May 29, 2014 06:34
-
-
Save abbood/2c1076abcbd7b60bb049 to your computer and use it in GitHub Desktop.
partials code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('partials', []) | |
.run(['$templateCache', function($templateCache) { | |
return $templateCache.put('/partials/nav.html', [ | |
'', | |
'<ul class="nav">', | |
' <li ng-class="getClass(\'/todo\')"><a ng-href="#/todo">todo</a></li>', | |
' <li ng-class="getClass(\'/view1\')"><a ng-href="#/view1">view1</a></li>', | |
' <li ng-class="getClass(\'/view2\')"><a ng-href="#/view2">view2</a></li>', | |
'</ul>',''].join("\n")); | |
}]) | |
.run(['$templateCache', function($templateCache) { | |
return $templateCache.put('/partials/partial1.html', [ | |
'', | |
'<p>This is the partial for view 1.</p>',''].join("\n")); | |
}]) | |
.run(['$templateCache', function($templateCache) { | |
return $templateCache.put('/partials/partial2.html', [ | |
'', | |
'<p>This is the partial for view 2.</p>', | |
'<p>', | |
' Showing of \'interpolate\' filter:', | |
' {{ \'Current version is v%VERSION%.\' | interpolate }}', | |
'</p>',''].join("\n")); | |
}]) | |
.run(['$templateCache', function($templateCache) { | |
return $templateCache.put('/partials/todo.html', [ | |
'', | |
'<div ng-app="ng-app">', | |
' <h2>Todo</h2>', | |
' <div ng-controller="TodoCtrl"><span>{{remaining()}} of {{todos.length}} remaining</span> [<a href="" ng-click="archive()">archive</a>]', | |
' <ul class="unstyled">', | |
' <li ng-repeat="todo in todos">', | |
' <label class="checkbox inline">', | |
' <input type="checkbox" ng-model="todo.done"><span class="done{{todo.done}}">{{todo.text}}</span>', | |
' </label>', | |
' </li>', | |
' </ul>', | |
' <form ng-submit="addTodo()" class="form-inline">', | |
' <p>', | |
' <input type="text" ng-model="todoText" size="30" placeholder="add new todo here">', | |
' <input type="submit" value="add" class="btn btn-primary">', | |
' </p>', | |
' </form>', | |
' </div>', | |
'</div>',''].join("\n")); | |
}]) | |
.run(['$templateCache', function($templateCache) { | |
return $templateCache.put('/partials/map.html', [ | |
'', | |
'<div class="container">', | |
' <div class="top_nav_bar"><a class="logo"></a><a class="menu_button"></a></div>', | |
' <div class="options_slider">', | |
' <ul>', | |
' <li>', | |
' <div class="car annotation">3</div>', | |
' <div class="car button"></div>', | |
' <ul class="car">', | |
' <li>', | |
' <div class="number">4</div>', | |
' </li>', | |
' <li>', | |
' <div class="number">3</div>', | |
' </li>', | |
' <li>', | |
' <div class="number">2</div>', | |
' </li>', | |
' <li>', | |
' <div class="number">1</div>', | |
' </li>', | |
' </ul>', | |
' </li>', | |
' <li>', | |
' <div class="price annotation">$54k</div>', | |
' <div class="button price"></div>', | |
' <div id="price_slider" class="slider">', | |
' <div></div>', | |
' <div class="caption"></div>', | |
' </div>', | |
' </li>', | |
' <li>', | |
' <div class="size annotation">250M</div>', | |
' <div class="button size"></div>', | |
' <div id="size_slider" class="slider">', | |
' <div></div>', | |
' <div class="caption"></div>', | |
' </div>', | |
' </li>', | |
' <li>', | |
' <div class="bed annotation">2</div>', | |
' <div class="button bed"></div>', | |
' <ul class="bed">', | |
' <li>', | |
' <div class="number">4</div>', | |
' </li>', | |
' <li>', | |
' <div class="number">3</div>', | |
' </li>', | |
' <li>', | |
' <div class="number">2</div>', | |
' </li>', | |
' <li>', | |
' <div class="number">1</div>', | |
' </li>', | |
' </ul>', | |
' </li>', | |
' </ul>', | |
' </div>', | |
' <div ng-controller="PropertyListCtrl">', | |
' <google-map center="map.center" zoom="map.zoom" draggable="true" dragging="map.dragging" bounds="map.bounds" events="map.events" options="map.options" pan="true" control="map.control">', | |
' <markers models="map.markers" icon="\'icon\'" labelContent="\'title\'" labelAnchor="22 0" coords="\'self\'" doCluster="true" clusterOptions="map.clusterOptions" click="\'onClicked\'"></markers>', | |
' </google-map>', | |
' </div>', | |
'</div>',''].join("\n")); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment