I found a better solution, maybe it can help somebody
replace "watch?v="
by "v/"
and it will work
var url = url.replace("watch?v=", "v/");
More Related Contents:
- Using angularjs filter in input element
- WebAPI CORS with Windows Authentication – allow Anonymous OPTIONS request
- how to convert the float 9.88 number to integer 9 in angularjs?
- ‘this’ vs $scope in AngularJS controllers
- How can I dynamically add a directive in AngularJS?
- Binary files corrupted – How to Download Binary Files with AngularJS
- Combating AngularJS executing controller twice
- AngularJS – Does $destroy remove event listeners?
- Difficulty with ng-model, ng-repeat, and inputs
- Angular ng-repeat conditional wrap items in element (group items in ng-repeat)
- Rendering directives within $sce.trustAsHtml
- Best way to represent a Grid or Table in AngularJS with Bootstrap 3? [closed]
- Angularjs Normal Links with html5Mode
- ng-change get new value and original value
- Angularjs JSONP not working
- $apply vs $digest in directive testing
- Redirect using AngularJS
- Angular JS break ForEach
- Angular scope function executed multiple times
- How to wait till the response comes from the $http request, in angularjs?
- What’s the meaning of require: ‘ngModel’?
- Angular directive for a fallback image
- Is it possible to use ng-include without web server?
- How to use `replace` of directive definition?
- How to highlight a selected row in ngRepeat?
- How to implement an ng-change for a custom directive
- ng-repeat specify a starting index
- how to make synchronous http request in angular js
- how do I get ng-include directive to work with a Content Delivery Network?
- Inject module dynamically, only if required