Skip to content

Instantly share code, notes, and snippets.

@goindwalia
Created August 25, 2014 10:24
Show Gist options
  • Save goindwalia/776285dc22ad9a22d8ef to your computer and use it in GitHub Desktop.
Save goindwalia/776285dc22ad9a22d8ef to your computer and use it in GitHub Desktop.
(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