Click here to Skip to main content
14,236,131 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi,

I am trying to add angular enabled p tag in umbraco configured page. I have created an seperate js file for the module & factory and in Umbraco I have added a new markdown editor and added angular enabled HTML in it.

but its not working. Simply not binding the angular scope variables.

pls can any one help me out..

What I have tried:

Umbraco markdown editor content:

<p>{{message}}</p>

Module creations and add scope variables.
angular.module('static', [])
            .controller('esastatic', ['$scope',  static]);
    function static($scope) {
       
        $scope.getMessage = function () {
            setTimeout(function () {
                $('#a').html('kjgh');
                $scope.message = 'Fetched after two seconds';
                console.log('message:' + $scope.message);
                $scope.$apply(); //this triggers a $digest
            }, 5000);
        };

        $scope.getMessage();
        
    }


I tried $apply() for binding the umbraco content

.

Posted
Updated 21-Mar-17 4:29am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100