-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
1 lines (1 loc) · 1.63 KB
/
Copy pathapp.js
File metadata and controls
1 lines (1 loc) · 1.63 KB
1
"use strict";var App;App=angular.module("app",["ngCookies","ngResource","ngRoute","app.controllers","app.directives","app.filters","app.services","partials"]),App.config(["$routeProvider","$locationProvider",function(t,r,e){return t.when("/todo",{templateUrl:"/partials/todo.html"}).when("/view1",{templateUrl:"/partials/partial1.html"}).when("/view2",{templateUrl:"/partials/partial2.html"}).otherwise({redirectTo:"/todo"}),r.html5Mode(!1)}]),angular.module("app.controllers",[]).controller("AppCtrl",["$scope","$location","$resource","$rootScope",function(t,r,e,o){return t.$location=r,t.$watch("$location.path()",function(r){return t.activeNavId=r||"/"}),t.getClass=function(r){return t.activeNavId.substring(0,r.length)===r?"active":""}}]).controller("MyCtrl1",["$scope",function(t){return t.onePlusOne=2}]).controller("MyCtrl2",["$scope",function(t){return t}]).controller("TodoCtrl",["$scope",function(t){return t.todos=[{text:"learn angular",done:!0},{text:"build an angular app",done:!1}],t.addTodo=function(){return t.todos.push({text:t.todoText,done:!1}),t.todoText=""},t.remaining=function(){var r;return r=0,angular.forEach(t.todos,function(t){return r+=t.done?0:1}),r},t.archive=function(){var r;return r=t.todos,t.todos=[],angular.forEach(r,function(r){return r.done?void 0:t.todos.push(r)})}}]),angular.module("app.directives",["app.services"]).directive("appVersion",["version",function(t){return function(r,e,o){return e.text(t)}}]),angular.module("app.filters",[]).filter("interpolate",["version",function(t){return function(r){return String(r).replace(/\%VERSION\%/gm,t)}}]),angular.module("app.services",[]).factory("version",function(){return"0.1"});