javascript - Binding src in embed does not work in chrome -


i'm using angularjs build web page it's working fine in ie , firefox when tried in chrome stop working. i'm wondering why not working in chrome , if there possible workaround.

html

<div data-ng-controller="documentcontroller">     <embed src={{documentid}} height="600" width="100%"/> </div> 

javascript

    (function(){     var document = angular.module('document', []);      document.controller('documentcontroller', ['$scope', '$routeparams', function($scope, $routeparams){         $scope.title = 'document';         $scope.documentid = "document/" + $routeparams.documentid;    }]); })(); 

edit error

http error 404  problem accessing /%7b%7bdocumentid%7d%7d. reason:      not found 

document global variable in browser environment (docs) , know can't overridden (maybe in old browsers). try choose name module prevent bad situations.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -