I have two Angular controllers:  function Ctrl1($scope) {     $scope.prop1 = "First"; }  function Ctrl2($scope) {     $scope.prop2 = "Second";     $scope.both = Ctrl1.prop1 + $scope.prop2; //This is what I would like to do ideally }...
This is a long shot, but has anyone seen this error before? I am trying to add 'Transporters' using express, angular and mongoDB. I get this error whenever I access a page ruled by the transporters controller:  Error: [ng:areq] http://error...
I'm writing an angularJS app. In this particular controller, I open a new browser window through the $window.open service. But in the new window, all the $scope variables are lost.  I tried to use window.parent but this doesn't work. In fac...
I'm wondering what the use cases are for these two methods of creating a controller:  Using ngController:  myApp.controller('myController', ['$scope', function ( $scope ) {  }]);   Constructing the controller within a directive wi...
This has been asked before but it didn't answer my question. I am pretty new to angular and I am just putting things together at the moment. I am trying to get my factory to work inside my controller. However I keep getting the following error in...
I've multiple controllers in my application, where I have some duplicate code like:  $scope.alert = null;  $scope.addAlert = function (message) {     $scope.alert = { type: 'danger', msg: message }; };  $scope.clearAlerts = function () {...
I have attached data attribute in each .state to identify the user (authenticated or public) as following (one state example)  $stateProvider  .state('admin-panel.public.home', {     url: '/p',     templateUrl: 'app/public/home.tm...
I'm using PHP to get data into my factory, which shows correctly in the success callback function within the controller. However, even after assigning the returned data to $scope.customers, it's not there if I do a console.log($scope.customer...
Is it possible to update the scope variable that points to a factory object, after the factory object is updated? If there are 2 angular controllers which share a factory object, if one of the controllers changes the factory object, it is not reflect...
Take the following plunk as an example:  http://plnkr.co/edit/vKFevXhhSprzFvesc6bG?p=preview  var app = angular.module('plunker', []);  app.service('SomeService', ['$rootScope', function ($rootScope) {     var service = {...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.