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

  • SEARCH
  • Home
  • 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 9161503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:58:52+00:00 2026-06-17T13:58:52+00:00

Demo: http://jsfiddle.net/sunnycpp/MPACc/4/ Same code copy-pasted here: HTML <div class=container> <debug-bar ng-controller=parentController> <debug-bar ng-controller=childController> <debug-bar

  • 0

Demo: http://jsfiddle.net/sunnycpp/MPACc/4/

Same code copy-pasted here:
HTML

<div class="container">
  <debug-bar ng-controller="parentController">
    <debug-bar ng-controller="childController">
      <debug-bar ng-controller="oneMoreChildController"></debug-bar>
    </debug-bar>
    <debug-bar ng-controller="oneMoreChildController"></debug-bar>
  </debug-bar>
</div>

Javascript

var angModule = angular.module('components', []);
angModule.directive('debugBar', function () {
  return {
    restrict: 'E',
    template: 
    '<div>'+
        '<form class="form-inline">' +
            '<input type="text" class="input-small" ng-model="myText"/>' +
            '<button class="btn btn-primary">Broadcast</button>' +
            '<button class="btn btn-primary">Emit</button>' +
        '</form>' +
        '<div ng-transclude></div>'+
    '</div>',
    transclude: true,
    replace: true
  };
});


function createController(myText) {
  return function ($scope) {
    $scope.myText = myText;
    $scope.$on("event", function (senderText) {
      console.log("Event received in:" + $scope.myText + " from Sender:" + senderText);
    });
    $scope.$broadCastEvent = function () {
      $scope.$broadcast("event", $scope.myText);
      console.log("Sent event from:" + $scope.myText);
    };
  };
}

angModule.controller("parentController", createController("In parent"));

angModule.controller("childController", createController("in FirstChild"));

angModule.controller("oneMoreChildController", createController("in oneMoreChildController"));
angModule.controller("oneMoreChildController", createController("in secondLevelChild"));
  • 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-17T13:58:53+00:00Added an answer on June 17, 2026 at 1:58 pm

    Because you didn’t define any. :p jsfiddle and bootstrap reset the margins and you don’t define any…

    Defining some margins fixes the problems immediately

    input,button{
     margin:0 5px;
    }
    

    Example

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

Sidebar

Related Questions

Please see the demo here: http://jsfiddle.net/Freewind/Vkp4U/ The html: <div class=outer> <div class=x>x</div> <div class=y>y</div>
Here is demo: http://jsfiddle.net/ENqy6/ There are 3 cyrillic letters inside .rur div. Custom font
Demo: http://jsfiddle.net/q4uNj/ So here's the problem: I can't figure out why the second div
In the code below and demo here http://jsfiddle.net/jasondavis/vp2YN/3/ you can see I need to
I'm having trouble selecting all contents of the div. Here's a demo: http://jsfiddle.net/KcX6A/304/ It's
Im having a big headcache with a header design: Here the demo: http://jsfiddle.net/uGECm/ The
Please see demo here: http://jsfiddle.net/mA6qm/1/ (expand console) Why aren't events being sent or received
Demo: http://jsfiddle.net/sunnycpp/fMXyP/5/ Consecutive show,hide calls produces a bug, Animation stops and does not resume
Demo: http://jsfiddle.net/nazym/1/ The code meant to show a popup when button pressed and hide
this is the demo : http://jsfiddle.net/KwYjr/10/ how to set the blue div's width is

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.