Regarding Ember-YII extension - http://www.yiiframework.com/wiki/409/ember-js-with-yii-rest-backend-demo-application/
I am trying to understand this demo … There is app/main.js - But I don’t understand what is “myApplication” here and who passes this ?
// Start the main app logic.
requirejs(['application'],
function (myApplication) {
var App=window.App= myApplication;
App.initialize()
});
Then , I have edited grid_bs.php - adding a new Menu item called "Advertise With Us"
<?php $this->widget('zii.widgets.CMenu', array(
'items' => array(
array('label' => 'Home', 'url' => array('/site/index')),
array('label' => 'About', 'url' => array('/site/page', 'view' => 'about')),
array('label' => 'Contact', 'url' => array('/site/contact')),
array('label' => 'Ember Contacts App', 'url' => array('/site/app')),
array('label' => 'Advertise With Us', 'url' => array('/site/advertise')),
// array('label' => 'Login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
// array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest)
),
// 'htmlOptions'=>array('class'=>'main-menu')
'htmlOptions' => array('class' => 'nav')
)); ?>
I created a new method "actionAdvertise" in SiteController -
//action that routes to Ember js Advertise Application
public function actionAdvertise()
{
$this->layout=false;
$this->render('advertise_app');
}
in "advertise_App" -
<script data-main="<?php echo Yii::app()->request->baseUrl; ?>/app/main"
src="<?php echo Yii::app()->request->baseUrl; ?>/app/lib/require/require.js"></script>
I need to show a different page than Sign In page template - A advertisement page using Ember Template…
Please suggest on how to do this as I am really struggling through Ember.js right now…