import { Injectable } from '@angular/core' ; author Ben Hayward
  @ Injectable ( ) export class PagesService { private internalPageRegex : RegExp = /^\/?p\/./ ; constructor ( ) { } param { string } path returns { boolean } public isInternalLink ( path ) { return new RegExp ( this . internalPageRegex ) . test ( path ) ; } }