Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8897051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:14:07+00:00 2026-06-15T00:14:07+00:00

As an example, one particular application state may have a home view that just

  • 0

As an example, one particular application state may have a home view that just renders some background container,

App.EditView = Ember.View.extend({
      templateName:  'edit-template',
 })


App.EditController = Ember.ObjectController.extend({
      title: 'Edit state',
})

Which are instantiated when I navigate to this state:

App.editRouter = Ember.Route.extend({

    route: '/edit',

    connectOutlets: function( router, context ){           
        router.get('applicationController').connectOutlet( 'mainOutlet', 'edit' )
    }
})

Once here, the user may manually declare new div elements which map to new view and controller ( and model but that’s no super relevant here ), the new div may or may not be a child of the div rendered by editView.

The current way I’m doing it

App.smallView1 = App.SmallView.create({ 
     controller: App.smallController1
}).append()

App.smallController1 = App.SmallController.create()

As you see, nothing here indicates under what state are the view and controller declared.
What I’m confused about:

What is the relationship between this view-controller pair and the instance of EditView and EditController?

What is the relationship between the pair and the editRouter?

Should there be dependancies that need to explicitly specified?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:14:09+00:00Added an answer on June 15, 2026 at 12:14 am

    This view-controller pair doesn’t seem to be used by the router, so you’d have to create a route for them and connect the outlet with your view-controller pair, unless you want to append this view to an element that won’t change per route. It also doesn’t have any relationship with the other view-controller pair.

    As for your questions:

    What is the relationship between this view-controller pair and the
    instance of EditView and EditController?

    A: The code, as it stands, presents no direct relationship between the small view and controller with edit view and controller, but the difference is that the pair EditView and EditController are not “created”, but “given” to the application, which will take care of instantiating that type when required through its own initialization logic (initialize) or when creating the instance of a view when it’s required. The pair smallView1 and smallController1 will probably not be good for the router as their instance names end with “1” and I’m not sure if Ember expects that, but anyway, these are being instantiated and directly attached to the application as “living” objects, which is not required when using the router. Does this answer your question?

    What is the relationship between the pair and the editRouter?

    A: In your code, editRouter is the definition of what state (since Route extends State) your application is when you are on that route; this means that the framework understands that when you are on a given state you need some specific things to occur, for example, loading the view that state requires, loading the data that view should display, etc… this is done through connectOutlet, so for this particular route you don’t have any relationship of any kind with smallView1 or smallController1 unless you use a different signature of connectOutlet to specify the viewClass and controller manually.

    Should there be dependancies that need to explicitly specified?

    A: Yes. When using the Router, your application must have a controller named ApplicationController, and when you call connectOutlet, the name you pass must be corresponding to one view and controller (I think the controller might not me required, but I’m not sure at the moment). So if you say connectOutlet('about'), the framework will look for a view named AboutView as per convention, then will instantiate this view and render on the appropriate outlet in the container view.

    How will the controller access the router if it needs to?

    A: At any point in your application you can access the router with App.router assuming your application is named “App” and your router was named “Router”, so in any of your methods in your controller you can, for example, use the router to transition: App.router.transitionTo('root.index.home').

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

May i achieve that server side application (using android bluetooth API)connect to particular client
I have a table, has many rows. for example one of from rows(all rows
I have a table, has many rows. for example one of from rows(all rows
We have a Java web application and we'd like to set up some basic
For one particular issue in the architecture of an application I'm working on, interfaces
I have to design a distributed application composed by one server (developed in Java)
I have a Rails application with several models-views-controllers which have some similar characteristics, for
I have one C# Application written using .net framework4.0.It is working good.Now i want
I've read many a post here re: GWT date handling. One in particular that
I have a simple MySQL script that I use in a web application to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.