Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- var app = angular.module('taskManager', []);
- app.controller('TaskManagerController', function () {
- this.task = tasks;
- this.newTask = {};
- this.addNewTask = function () {
- tasks.push(this.newTask);
- this.newTask = {};
- };
- });
- app.controller('PanelController', function () {
- this.tab = 1;
- this.selectTab = function (setTab) {
- this.tab = setTab;
- };
- this.isSelected = function (checkTab) {
- return this.tab === checkTab;
- };
- });
- app.directive('taskDescription', function () {
- return {
- restrict: 'E', //element czyli tag, dyrektywa
- templateUrl: '~/Views/task-description.html'
- };
- });
- var tasks = [
- {
- name: 'feed dog',
- time: '1388123412323',
- description: ' Fido is hungry',
- done: false,
- disabled: false
- },
- {
- name: 'do dishes',
- time: '1389123412323',
- description: '. . .',
- done: false,
- disabled: false
- }
- ];
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement