Created
August 25, 2014 10:24
-
-
Save goindwalia/776285dc22ad9a22d8ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function(){ | |
var app = angular.module('FirstAngular', []); | |
app.controller('FirstAppController', ['$scope', function($scope){ | |
$scope.webpages = pages; | |
}]); | |
app.controller("PanelController", ['$scope', function($scope){ | |
$scope.tab = 1; | |
$scope.selectTab = function(setTab) { | |
$scope.tab = setTab; | |
}; | |
$scope.isSelected = function(checkTab) { | |
return $scope.tab == checkTab; | |
}; | |
$scope.dateTimeNow = Date.now(); | |
}]); | |
var pages = [{ | |
id: 1, | |
name: 'Home', | |
head: 'Welcome', | |
body: 'Welcome to my first Angular Project. This is homepage.' | |
}, | |
{ | |
id: 2, | |
name: 'About', | |
head: 'About US', | |
body: 'Sample about us page.' | |
}, | |
{ | |
id: 3, | |
name: 'Feedback', | |
head: 'Feedback', | |
body: '' | |
}]; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment