0

I have a question about ngRoute.If when I wrote as follows there is not a problem

index.html

<div ng-app="linkyDemo">
<div ng-controller="Ctrl" ng-bind-html="text| linky"></div></div>

app.js

var app = angular.module('app', ['ngSanitize'])
function Ctrl($scope) {
$scope.text= 'http://absdef.com';
}

But when I use ngRoute directive like as

var app = angular.module('app', ['ngRoute', 'ngSanitize']);

linky filter doesn't work. How can I solve this problem?

Mensure
  • 1
  • 1
  • Are you using the latest version/s? – Tony Barnes Jun 11 '15 at 12:31
  • I 'm using angularjs 1.2.25 – Mensure Jun 11 '15 at 12:46
  • 1.2.25 was released in September 2014 - you should upgrade to the latest version. Are you sure you have all the necessary scripts referenced in your HTML index: ng-route.js, ng-sanitize.js etc? – Tony Barnes Jun 11 '15 at 13:21
  • When I was using angular 1.2.25 both of them had worked without any problem,but they didn.'t work together. Now, after ugrading neither ngRoute or ngSanitize work – Mensure Jun 11 '15 at 14:12
  • what exactly did you upgrade and to which versions? – Kirill Slatin Jun 11 '15 at 14:15
  • I tried this version https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js – Mensure Jun 11 '15 at 14:24
  • If I were you, I would scaffold a new app with yeoman, and work from that. https://github.com/yeoman/generator-angular More than likely to work out of the box, with the latest versions of everything. You will save yourself trying to find out why X version isn't working with Y version and so on. – Tony Barnes Jun 11 '15 at 14:25

0 Answers0