Skip to content

Instantly share code, notes, and snippets.

@jasperboyd
Created November 13, 2015 22:01
Show Gist options
  • Save jasperboyd/6ae6dbcd5b5478197b82 to your computer and use it in GitHub Desktop.
Save jasperboyd/6ae6dbcd5b5478197b82 to your computer and use it in GitHub Desktop.
TypeScriptController
/// <reference path='../../../../client/typings/slatwallTypescript.d.ts' />
/// <reference path='../../../../client/typings/tsd.d.ts' />
module slatwalladmin {
'use strict';
export class tscontrol{
public static $inject=["collectionConfigService"];
public collectionConfig;
constructor(private collectionConfigService:slatwalladmin.collectionConfig){
this.collectionConfig = collectionConfigService.newCollectionConfig("Product");
this.collectionConfig.addFilter("productName", "like", "gobbledigook");
//works pretty much like smart list see admin/client/ts/services/collectionconfigservice.ts for more details
}
}
angular.module('slatwalladmin').controller('tscontrol', tscontrol);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment