function articleModel(n,r,u){n.article={newskey:"",headline:"",summary:"",breakdate:"",keywords:"",website:""};n.Load=function(){var f,o=window.location.pathname,r=o.split("/"),e,s=r[1];e=s==="IPO-Investing"?r[4]:r[3];f=geturi("Article?newskey="+e);u({method:"GET",url:f}).success(function(r){var u=[],f=0;$.each(r,function(n,r){if(r.logo=r.logo===null?"<span class='logo_tic'>"+r.logoticker+"<\/span>":"<img src='"+r.logo+"' alt='"+r.logoticker+"'>",r.summary.indexOf("[")>-1&&r.summary.indexOf("]")>-1){var s=r.summary.split(""),e=0,o=0;for(i=0;i<s.length;i++)s[i]==="["&&(e=i),s[i]==="]"&&(o=i),e>0&&o>0&&(u[f]=r.summary.substring(e,o+1),f+=1,e=0,o=0);for(t=0;t<u.length;t++)r.summary=r.summary.replace(u[t],linktoprofile(u[t]))}u=[];f=0});n.article=r;n.articlelen=r.length})};n.Load();n.trustAsHtml=function(n){return r.trustAsHtml(n)}}function linktoprofile(n){var t=n.replace("[","").replace("]","").toUpperCase();return"<a class='profilelink' href='/Profile/"+t+"'>"+t+"<\/a>"}var app=angular.module("myApp",["ngSanitize"]);app.controller("articleModel",articleModel);articleModel.$inject=["$scope","$sce","$http"]