Wrox Programmer Forums
|
BOOK: Professional AngularJS
This is the forum to discuss the Wrox book Professional AngularJS by Valeri Karpov, Diego Netto; ISBN: 978-1-118-83207-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional AngularJS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2015, 03:59 PM
Registered User
 
Join Date: Nov 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Visual Studio 2013 Issues

If you're doing this in Visual Studio, you're going to have to tell IIS that it's ok to read a .json file, or you'll keep getting a file not found error. For me it was modifying the applicationhost.config to include this:

<mimeMap fileExtension=".json" mimeType="application/javascript" />

within the staticContent section. See this thread:

http://stackoverflow.com/questions/1...s-2013-for-web

That was for Chapter 1, btw.

Last edited by Shauma; November 6th, 2015 at 04:05 PM..
 
Old November 10th, 2015, 07:50 PM
Registered User
 
Join Date: Nov 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Post Step 8 Issue

When you get to step 8, you may be seeing this error in the console "html.indexOf is not a function". Some reading suggests that getTrustedHtml expects a string and not an object (but I've seen older examples just as the book has it, so it must've changed at some point), to get the contenteditable.js to work, change this:

Code:
ngModelCtrl.$render = function () {
  $element.html($sce.getTrustedHtml(ngModelCtrl.$viewValue || ''));
to this:

Code:
ngModelCtrl.$render = function () {
  $element.html($sce.getTrustedHtml(ngModelCtrl.$viewValue.toString() || ''));

Last edited by Shauma; November 11th, 2015 at 08:31 PM..
 
Old November 11th, 2015, 08:17 PM
Registered User
 
Join Date: Nov 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Post Step 8-9-10 Issue

Doing the examples through Visual Studio 2013, and the following versions of these browsers:

Chrome: Version 46.0.2490.80
IE: Version 11.0.9600.18059
Firefox: Version 42.0

here are the issues I see:

Chrome: In-cell editing works, color highlighting does not
IE: In-cell editing doesn't work, color highlighting does work
Firefox: It doesn't work - at all.

Last edited by Shauma; November 11th, 2015 at 08:23 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio 2013 Community edition Antonius Block BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 1 April 21st, 2015 04:05 PM
Update 4 & visual studio exp 2013 for the web CPEPayroll BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 2 December 17th, 2014 10:29 PM
Virtual Path setting in Visual Studio 2013 rajatake ASP.NET 4 General Discussion 0 March 13th, 2014 06:17 AM
I cannot open any download codes in Visual Studio 2013 huanalee BOOK: MCSD Certification Toolkit (Exam 70-483): Programming in C# 7 February 8th, 2014 08:39 PM
Installing Visual Studio Express 2013 vbboyd ASP.NET 4.5 General Discussion 0 November 14th, 2013 03:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.