What’s the least redundant way to make a site with JavaScript-generated HTML crawlable?

Why didn’t I think of this before! Just use http://phantomjs.org. It’s a headless webkit browser. You’d just build a set of actions to crawl the UI and capture the html at every state you’d like. Phantom can turn the captured html into .html files for you and save them to your web server. The whole … Read more

The tag helper ‘input’ must not have C# in the element’s attribute declaration area

If you don’t need to use the TagHelper, you can use <!elementName> to disable it for a specific element: <!textarea class=”testClass” asp-for=”testId” @readonlyAttribute>@Model.Id</!textarea> See @glenn223’s answer for a more structural solution. I made an improved version of his solution, by adding support for anonymous objects: using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; namespace {YourBaseNameSpace}.Helpers.TagHelpers { [HtmlTargetElement(Attributes = “custom-attributes”)] … Read more

Backbone.js: complex views combining multiple models

In that case, I’d consider a dynamic model with both of your sub-models. In your route handler, you could do something like this: var model = new Backbone.Model(); model.set({contacts: new ContactsModel(), users: new UsersModel()}); var view = new GridView({model: model}); Of course, there is nothing stopping you from passing in the models separately: var contacts … Read more

Why is $element available/injected in controller?

Quick summary A well written directive that is extendable and/or interacts with other directives will have a controller. That controller needs to access the DOM because it is where that directive’s functionality is defined. Directives are effectively a different way to bind a controller/scope to an element on the page; the preferred way to add … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)