Friends, I am building a MEAN stack application. * I have hosted the application at Heroku and database from mLab.
When I run it at localhost everything is fine.
Whenever I run it at localhost everything goes fine each and every script runs properly.
What I want to do?
I need to hide the division on click of another division. Each division is linked to another specific division. If one is clicked that division linked div should show and the previous one should hide.
Everything goes well until I deploy my changes.The code does not work and all the divs appear at one time. Code doesn't work.
I have used angular and jQuery
- To hide the division I have used angular ng-if
To call a function I have used ng-click. Here's my code:
var app = angular.module('myApp', []); app.controller('eduController', function($scope, $http) { $scope.info = 1; $scope.info2 = 0; $scope.info3 = 0; $scope.hideInfo = function() { $scope.info = 1; $scope.info2 = 0; $scope.info3 = 0; } $scope.hideInfo2 = function() { $scope.info = 0; $scope.info2 = 1; $scope.info3 = 0; } $scope.hideInfo3 = function() { $scope.info = 0; $scope.info2 = 0; $scope.info3 = 1; } });