Last active
December 9, 2016 14:20
-
-
Save ankushdharkar/9c27b156841de7e8541b7e3a652b21e8 to your computer and use it in GitHub Desktop.
Duplicate `index.loading`
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
isProfilePageShown: Ember.computed('eUsername', function(){ | |
if(this.get('eUsername')){ | |
return true; | |
} | |
else{ | |
return false; | |
} | |
}), | |
isHomePageShown: Ember.computed('isProfilePageShown', function(){ | |
if(this.get('isProfilePageShown')){ | |
return false; | |
} | |
else{ | |
return true; | |
} | |
}) | |
}); |
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
import Ember from 'ember'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none', | |
rootURL: config.rootURL | |
}); | |
Router.map(function() { | |
// BOTH '/' and '/user123' do not work anymore :( | |
this.route('index'); // Uncaught UnrecognizedURLError {message: "/", name: "UnrecognizedURLError"} | |
this.route('index',{path:':u_name'}, function (){}); | |
}); | |
export default Router; |
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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
model(params){ | |
var vUsername = params.u_name; | |
if(vUsername){ | |
var indexController = this.controllerFor('index'); | |
indexController.set('eUsername', vUsername); | |
alert(vUsername); | |
} | |
else{ | |
alert("No Username found!"); | |
} | |
} | |
}); |
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
{ | |
"version": "0.10.6", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.9.0", | |
"ember-data": "2.9.0", | |
"ember-template-compiler": "2.9.0", | |
"ember-testing": "2.9.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment