- 'use strict';
- angular.module('myApp')
- .controller('MyCtrl', function ($scope, $location, $stateParams, DeviceService, $filter) {
- $scope.expPath =
- {
- 'Smartphone': false,
- 'Tablet': false,
- 'Laptop': false,
- 'Desktop': false,
- 'HDTV': false
- };
- $scope.setExpPath = function(device)
- {
- console.log(device);
- if($scope.expPath[device] == false)
- {
- $scope.expPath[device] = true;
- console.log($scope.expPath[device]) //returns true
- } else {
- $scope.expPath[device] = false;
- console.log($scope.expPath[device])
- }
- }
- $scope.getShare = function()
- {
- console.log($scope.expPath['Smartphone']); //returns false
- }
- });
SHARE
TWEET
Untitled
a guest
Dec 5th, 2014
156
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

