无论我使用什么屏幕尺寸,Sidenav总是相同的尺寸.我尝试添加诸如 - flex - flex ="85"之类的属性(以获得其容器的85%)
似乎无法找到一个好方法.
我使用的tsd现已弃用,我正在尝试使用打字.typings存储库非常小,我找不到任何我需要的d.ts文件.我需要的所有文件都在GitHub DefinitelyTyped存储库中,但我找不到使用typings安装它们的方法.
这是我试过的命令:
typings install github:DefinitelyTyped/DefinitelyTyped/angular-formly/angular-formly.d.ts
Run Code Online (Sandbox Code Playgroud)
我收到错误:
typings ERR! message Attempted to compile "angular-formly" as a dependency,
but it contains some ambient module declarations
("AngularFormly", "angular-formly").
Run Code Online (Sandbox Code Playgroud)
任何线索?
我在i18n(对于Angular2)中找不到任何文档,这些文档不仅仅是在HTML中显示翻译文本.我需要做的是直接在我的代码中获取翻译的文本.在使用ng-translate功能的Angular 1中,使用$ translate服务很容易获得它.我在Angular 2的新i18n中找不到相应的东西.我错过了什么吗?
在我的控制器中,我调用了一个需要递归调用自身的工厂函数.代码工作时只是简单的javascript函数没有在工厂中定义,但我试图将它们隔离得更好.
这就是控制器中代码片段的样子:
myApp.controller('VisionCtrl', ['$scope', 'AppFactory', function ($scope, AppFactory,) {
var promiseTaxo;
promiseTaxo = AppFactory.getTaxonomy("vision3", "Vision Type");
}])
Run Code Online (Sandbox Code Playgroud)
在工厂模块中:
myApp.factory('AppFactory', ['$http', '$q', function($http, $q, TaxoFactory) {
return {
getTaxonomy: function(group, termSet) {
... lots of code ....
if (termSet.length > 0) { getTaxonomy(group, childTermSet) }
}
}
}])
Run Code Online (Sandbox Code Playgroud)
这是超级简化的,但想法是在getTaxonomy函数中,如果我找到子节点,我递归调用自己.在我处理处理和承诺的异步性质的地方还有很多东西,但是当我将这些代码放在工厂外时,它的工作正常.
我只是不知道如何在getTaxonomy中调用getTaxonomy!
所有 iOS SDK 示例都提供了用于访问邮件、日历、ODfB 文件的工作代码,但没有显示如何访问 SharePoint 列表项。所以我正在 Swift 中尝试一个简单的 REST 调用,但不断收到以下错误:
[0] (null) @"error_description" : @"不支持的安全令牌。
这是我的应用程序启动时的代码子集:
var resourceID : String = "https://mytenant.sharepoint.com"
var authorityURL : String = "https://login.windows.net/common/"
var clientID : String = "xxd4200eb-7284-41be-a434-abb269b82f0f"
var redirectURI : NSURL = NSURL(string: "http://www.mycompanywebsite.com")!
override func viewDidLoad() {
super.viewDidLoad()
var defaults: NSUserDefaults = NSUserDefaults.standardUserDefaults()
var er : ADAuthenticationError? = nil
var authContext:ADAuthenticationContext = ADAuthenticationContext(authority: authorityURL, error: &er)
authContext.acquireTokenWithResource(resourceID, clientId: clientID, redirectUri: redirectURI) { (result: ADAuthenticationResult!) -> Void in
if (result.accessToken == nil) …Run Code Online (Sandbox Code Playgroud) angularjs ×2
adal ×1
angular ×1
css ×1
ios ×1
javascript ×1
office365 ×1
sharepoint ×1
swift ×1
tsd ×1
typescript ×1