Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

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

Module creations and add scope variables.
JavaScript
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900