Im trying to catch the variables fromcontroller to use it in the view. but it wont work, but i do know that it exists ( debug on the picture below).
problem: I dont get anything in the view.
note: it might be cause the structure, main structure is from: https://github.com/meanjs/mean
response:
nothing
my view:
<body class="ng-cloak" ng-controller="HeaderController as aux">
trying to get it to work:
<div class="cometchat_name">{{ varselmessage }} {{ aux.varselmessage }}</div>
function:
(function () {
'use strict';
angular
.module('core')
.controller('HeaderController', HeaderController);
HeaderController.$inject = ['$scope', '$state', 'Authentication', '$rootScope','Socket'];
function HeaderController($scope, $state, Authentication, $rootScope,Socket) {
var aux = this;
$scope.datatest = 200001;
$rootScope.datatest = 900;
$scope.varselmessage = 'varsel';
aux.varselmessage = 'varsel2';
$scope.notifications = [{text: " melding" , image : "kapring"}];
console.log("loaded , maybe possible4?");
}
}());

routing?controller assyntax